diff options
Diffstat (limited to 'meta/recipes-devtools/libtool/libtool')
19 files changed, 395 insertions, 237 deletions
diff --git a/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Handle-trailing-slashes-on-install-command.patch b/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Handle-trailing-slashes-on-install-command.patch new file mode 100644 index 0000000000..eeb5ebf416 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Handle-trailing-slashes-on-install-command.patch @@ -0,0 +1,35 @@ +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Subject: [PATCH 01/12] ltmain.in: Handle trailing slashes on install commands correctly + +A command like: + +libtool --mode=install /usr/bin/install -c gck-roots-store-standalone.la '/image/usr/lib/gnome-keyring/standalone/' + +where the path ends with a trailing slash currently fails. This occurs in +software like gnome-keyring or pulseaudio and is because the comparision +code doesn't see the paths as equal. Strip both paths to ensure this works +reliably. + +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00010.html] + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -2356,8 +2356,14 @@ func_mode_install () + func_append dir "$objdir" + + if test -n "$relink_command"; then ++ # Strip any trailing slash from the destination. ++ func_stripname '' '/' "$libdir" ++ destlibdir=$func_stripname_result ++ func_stripname '' '/' "$destdir" ++ s_destdir=$func_stripname_result ++ + # Determine the prefix the user has applied to our future dir. +- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` ++ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that diff --git a/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Parse-additional-clang-options.patch b/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Parse-additional-clang-options.patch new file mode 100644 index 0000000000..d59b5a834e --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Parse-additional-clang-options.patch @@ -0,0 +1,37 @@ +From c3b90d6107a1b638477d5f4dcee48af289647af7 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 9 Mar 2022 12:52:51 -0800 +Subject: [PATCH] ltmain.in: Parse additional clang options + +clang uses -rtlib and --unwindlib to select proper compiler runtime in +some cases. There fore pass these options to linker when found in +ldflags + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + build-aux/ltmain.in | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index 6a7bb72..c355c0c 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -5423,10 +5423,13 @@ func_mode_link () + # --sysroot=* for sysroot support + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -stdlib=* select c++ std lib with clang ++ # -rtlib=* select c runtime lib with clang ++ # --unwindlib=* select unwinder library with clang + # -f*-prefix-map* needed for lto linking + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ +- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*|-f*-prefix-map*) ++ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ ++ -rtlib=*|--unwindlib=*|-f*-prefix-map*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + func_append compile_command " $arg" +-- +2.35.1 + diff --git a/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch b/meta/recipes-devtools/libtool/libtool/0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch index ad2b110530..6da283959e 100644 --- a/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch +++ b/meta/recipes-devtools/libtool/libtool/0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch @@ -1,16 +1,17 @@ -Upstream-Status: Pending +From: Khem Raj <raj.khem@gmail.com> +Subject: [PATCH 02/12] libtool.m4: Rename the --with-sysroot option to avoid conflict with gcc/binutils This patch renames the --with-sysroot option to --with-libtool-sysroot to avoid namespace conflict with binutils, gcc and other toolchain -components. +components since these componets also add that option to configure +and this becomes confusing and conflicting otherwise. -I also reported the problem to libtool here +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> +Upstream report: http://lists.gnu.org/archive/html/libtool/2010-10/msg00048.html --Khem Raj <raj.khem@gmail.com> - -Updated by: Robert Yang <liezhi.yang@windriver.com> +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00014.html] diff --git a/m4/libtool.m4 b/m4/libtool.m4 --- a/m4/libtool.m4 diff --git a/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch b/meta/recipes-devtools/libtool/libtool/0003-ltmain.in-Add-missing-sysroot-to-library-path.patch index 6af99f327c..0103a00451 100644 --- a/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch +++ b/meta/recipes-devtools/libtool/libtool/0003-ltmain.in-Add-missing-sysroot-to-library-path.patch @@ -1,12 +1,14 @@ -Upstream-Status: Pending +From: Khem Raj <raj.khem@gmail.com> +Subject: [PATCH 03/12] ltmain.in: Add missing sysroot to library path -When using sysroot we should append it to libdir, which is helpful in +When using a sysroot we should append it to libdir, which is helpful in cross builds as the system is staged in the sysroot. For normal builds, i.e. when lt_sysroot is not set, it will still behave the same and add -L/usr/lib to the relink command. --Khem Raj <raj.khem@gmail.com> -Updated by: Robert Yang <liezhi.yang@windriver.com> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00017.html] diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in --- a/build-aux/ltmain.in diff --git a/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch b/meta/recipes-devtools/libtool/libtool/0004-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch index 5c9f8cc9c0..21b3dfe306 100644 --- a/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch +++ b/meta/recipes-devtools/libtool/libtool/0004-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch @@ -1,13 +1,13 @@ -Upstream-Status: Inappropriate [embedded specific] +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Subject: [PATCH 04/12] ltmain.sh: Fix sysroot paths being encoded into RPATHs -Enalbing sysroot support exposed a bug where the final library -had an RPATH encoded into it which still pointed to the sysroot. -This works around the issue until it gets sorted out upstream. +There is a bug where RPATHs could end up containing sysroot values when +cross compiling which is obviously incorrect. Strip out sysroot components +from libdir when building RPATH values to avoid this. -Fix suggested by Richard Purdie <richard.purdie@intel.com> -Signed-off-by: Scott Garman <scott.a.garman@intel.com> -Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> -Updated by: Robert Yang <liezhi.yang@windriver.com> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00009.html] diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in --- a/build-aux/ltmain.in diff --git a/meta/recipes-devtools/libtool/libtool/fix-rpath.patch b/meta/recipes-devtools/libtool/libtool/0005-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch index a2ec9473e7..50d47d9f7a 100644 --- a/meta/recipes-devtools/libtool/libtool/fix-rpath.patch +++ b/meta/recipes-devtools/libtool/libtool/0005-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch @@ -1,18 +1,21 @@ -We don't want to add RPATHS which match default linker -search paths, they're a waste of space. This patch -filters libtools list and removes the ones we don't need. +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Subject: [PATCH 05/12] ltmain.in: Don't encode RATHS which match default linker paths -RP 23/9/2011 +We don't want to add RPATHS which match default linker search paths, they're +a waste of space. This patch filters libtools list of paths to encoode and +removes the ones we don't need. -Upstream-Status: Pending +Libtool may be passed link paths of the form "/usr/lib/../lib" so normalize +the paths before comparision. -Updated by: Robert Yang <liezhi.yang@windriver.com> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> -Index: libtool-2.4.2/build-aux/ltmain.in -=================================================================== ---- libtool-2.4.2.orig/build-aux/ltmain.in -+++ libtool-2.4.2/build-aux/ltmain.in -@@ -7286,8 +7286,14 @@ EOF +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00013.html] + +diff -u b/build-aux/ltmain.in b/build-aux/ltmain.in +--- b/build-aux/ltmain.in ++++ b/build-aux/ltmain.in 2012-08-22 11:01:34.191345989 -0700 +@@ -7286,8 +7286,16 @@ esac fi else @@ -20,8 +23,10 @@ Index: libtool-2.4.2/build-aux/ltmain.in - func_append dep_rpath " $flag" + # We only want to hardcode in an rpath if it isn't in the + # default dlsearch path. ++ func_normal_abspath "$libdir" ++ libdir_norm=$func_normal_abspath_result + case " $sys_lib_dlsearch_path " in -+ *" $libdir "*) ;; ++ *" $libdir_norm "*) ;; + *) eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + ;; @@ -29,7 +34,7 @@ Index: libtool-2.4.2/build-aux/ltmain.in fi elif test -n "$runpath_var"; then case "$perm_rpath " in -@@ -8019,8 +8025,14 @@ EOF +@@ -8019,8 +8027,16 @@ esac fi else @@ -37,8 +42,10 @@ Index: libtool-2.4.2/build-aux/ltmain.in - func_append rpath " $flag" + # We only want to hardcode in an rpath if it isn't in the + # default dlsearch path. ++ func_normal_abspath "$libdir" ++ libdir_norm=$func_normal_abspath_result + case " $sys_lib_dlsearch_path " in -+ *" $libdir "*) ;; ++ *" $libdir_norm "*) ;; + *) eval flag=\"$hardcode_libdir_flag_spec\" + rpath+=" $flag" + ;; @@ -46,7 +53,7 @@ Index: libtool-2.4.2/build-aux/ltmain.in fi elif test -n "$runpath_var"; then case "$perm_rpath " in -@@ -8070,8 +8082,14 @@ EOF +@@ -8070,8 +8086,14 @@ esac fi else diff --git a/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch b/meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch index 1bd95980c0..999971241f 100644 --- a/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch +++ b/meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch @@ -1,16 +1,18 @@ -Upstream-Status: Pending +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Subject: [PATCH 06/12] libtool.m4: Handle "/" as a sysroot correctly -This patch updates libtool.m4 (and its output) to resolve a problem -with variable 'lt_sysroot' not being properly updated if the option -'--with[-libtool]-sysroot' is not provided when running the 'configure' -script for a package. +Update libtool.m4 to resolve a problem with lt_sysroot not being properly +updated if the option '--with[-libtool]-sysroot' is not provided when +running the 'configure' script for a package so that "/" as a sysroot +is handled correctly by libtool. -I have also reported the problem to libtool here +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> +Upstream Report: http://lists.gnu.org/archive/html/bug-libtool/2013-09/msg00005.html -Signed-off-by: Hans Beckerus <hans.beckerus at gmail.com> -Updated by: Robert Yang <liezhi.yang@windriver.com> +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00018.html] + --- diff --git a/m4/libtool.m4 b/m4/libtool.m4 --- a/m4/libtool.m4 diff --git a/meta/recipes-devtools/libtool/libtool/0001-libtool-Fix-support-for-NIOS2-processor.patch b/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch index bbd36d8dc1..395464e908 100644 --- a/meta/recipes-devtools/libtool/libtool/0001-libtool-Fix-support-for-NIOS2-processor.patch +++ b/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch @@ -1,7 +1,5 @@ -From df2cd898e48208f26320d40c3ed6b19c75c27142 Mon Sep 17 00:00:00 2001 From: Marek Vasut <marex@denx.de> -Date: Thu, 17 Sep 2015 00:43:15 +0200 -Subject: [PATCH] libtool: Fix support for NIOS2 processor +Subject: [PATCH 07/12] libtool: Fix support for NIOS2 processor The name of the system contains the string "nios2". This string is caught by the some of the greedy checks for OS/2 in libtool, @@ -13,7 +11,10 @@ checks to prevent the OS/2 check incorrectly trapping the nios2 as well. Signed-off-by: Marek Vasut <marex@denx.de> -Upstream-Status: Submitted +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00021.html] + --- build-aux/ltmain.in | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/meta/recipes-devtools/libtool/libtool/0001-libtool-Check-for-static-libs-for-internal-compiler-.patch b/meta/recipes-devtools/libtool/libtool/0008-libtool-Check-for-static-libs-for-internal-compiler-.patch index 8c7c39feb6..afffdb9fd4 100644 --- a/meta/recipes-devtools/libtool/libtool/0001-libtool-Check-for-static-libs-for-internal-compiler-.patch +++ b/meta/recipes-devtools/libtool/libtool/0008-libtool-Check-for-static-libs-for-internal-compiler-.patch @@ -1,8 +1,7 @@ -From 40a2da75e6d95cc7c498ebda95ab19ae0db2ebfb Mon Sep 17 00:00:00 2001 +From b9993338080325a6e2b2ec94ca0ece80e7fa3fb6 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 26 Jan 2019 12:54:26 -0800 -Subject: [PATCH] libtool: Check for static libs for internal compiler - libraries +Subject: [PATCH 08/12] libtool: Check for static libs for internal compiler libraries Libtool checks only for libraries linked as -l* when trying to find internal compiler libraries. Clang, however uses the absolute @@ -10,11 +9,13 @@ path to link its internal libraries e.g. compiler_rt. This patch handles clang's statically linked libraries when finding internal compiler libraries. -https://crbug.com/749263 +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> -Upstream-Status: Submitted [https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866] +https://crbug.com/749263 +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866 -Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00016.html] --- m4/libtool.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-autoconf.patch b/meta/recipes-devtools/libtool/libtool/0009-Makefile.am-make-sure-autoheader-run-before-autoconf.patch index 2e9908725e..348cd3c1ae 100644 --- a/meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-autoconf.patch +++ b/meta/recipes-devtools/libtool/libtool/0009-Makefile.am-make-sure-autoheader-run-before-autoconf.patch @@ -1,7 +1,5 @@ -From dfbbbd359e43e0a55fbea06f2647279ad8761cb9 Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> -Date: Wed, 24 Mar 2021 03:04:13 +0000 -Subject: [PATCH] Makefile.am: make sure autoheader run before autoconf +Subject: [PATCH 09/12] Makefile.am: make sure autoheader run before autoconf autoheader will update ../libtool-2.4.6/libltdl/config-h.in which autoconf needs, so there comes a race sometimes as below: @@ -10,9 +8,11 @@ autoconf needs, so there comes a race sometimes as below: So make sure autoheader run before autoconf to avoid this race. -Upstream-Status: Submitted [libtool-patches@gnu.org maillist] - Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00015.html] + --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-automake.patch b/meta/recipes-devtools/libtool/libtool/0010-Makefile.am-make-sure-autoheader-run-before-automake.patch index 87f8492346..cd963ef1be 100644 --- a/meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-automake.patch +++ b/meta/recipes-devtools/libtool/libtool/0010-Makefile.am-make-sure-autoheader-run-before-automake.patch @@ -1,7 +1,5 @@ -From e82c06584f02e3e4487aa73aa05981e2a35dc6d1 Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> -Date: Tue, 13 Apr 2021 07:17:29 +0000 -Subject: [PATCH] Makefile.am: make sure autoheader run before automake +Subject: [PATCH 10/12] Makefile.am: make sure autoheader run before automake When use automake to generate Makefile.in from Makefile.am, there comes below race: @@ -10,7 +8,10 @@ comes below race: It is because the file config-h.in in updating process by autoheader, so make automake run after autoheader to avoid the above race. -Upstream-Status: Submitted [libtool-patches@gnu.org maillist] +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00020.html] Signed-off-by: Mingli Yu <mingli.yu@windriver.com> --- diff --git a/meta/recipes-devtools/libtool/libtool/0011-ltmain.in-Handle-prefix-map-compiler-options-correct.patch b/meta/recipes-devtools/libtool/libtool/0011-ltmain.in-Handle-prefix-map-compiler-options-correct.patch new file mode 100644 index 0000000000..b121a3c750 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0011-ltmain.in-Handle-prefix-map-compiler-options-correct.patch @@ -0,0 +1,26 @@ +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Subject: [PATCH 11/12] ltmain.in: Handle prefix-map compiler options correctly + +If lto is enabled, we need the prefix-map variables to be passed to the linker. +Add these to the list of options libtool passes through. + +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00019.html] + +Index: libtool-2.4.6/build-aux/ltmain.in +=================================================================== +--- libtool-2.4.6.orig/build-aux/ltmain.in ++++ libtool-2.4.6/build-aux/ltmain.in +@@ -5424,9 +5424,10 @@ func_mode_link () + # --sysroot=* for sysroot support + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -stdlib=* select c++ std lib with clang ++ # -f*-prefix-map* needed for lto linking + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ +- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) ++ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*|-f*-prefix-map*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + func_append compile_command " $arg" diff --git a/meta/recipes-devtools/libtool/libtool/debian-no_hostname.patch b/meta/recipes-devtools/libtool/libtool/0012-libtool.m4-For-reproducibility-stop-encoding-hostnam.patch index 5add0cca3b..64f911d46c 100755..100644 --- a/meta/recipes-devtools/libtool/libtool/debian-no_hostname.patch +++ b/meta/recipes-devtools/libtool/libtool/0012-libtool.m4-For-reproducibility-stop-encoding-hostnam.patch @@ -1,10 +1,16 @@ -libtool: remove host specific info from header file +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Subject: [PATCH 12/12] libtool.m4: For reproducibility stop encoding hostname in libtool script + +For reproducibilty, stop encoding the hostname into the libtool script, this isn't +really adding much to debugging and most distros are carrying such a patch now as +reproducibility is important. + +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> https://sources.debian.org/data/main/libt/libtool/2.4.6-10/debian/patches/ no_hostname.patch -Upstream-Status: Inappropriate [not author] -Signed-off-by: Joe Slater <joe.slater@windriver.com> +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00011.html] --- Index: libtool-2.4.6/m4/libtool.m4 diff --git a/meta/recipes-devtools/libtool/libtool/ARFLAGS-use-cr-instead-of-cru-by-default.patch b/meta/recipes-devtools/libtool/libtool/ARFLAGS-use-cr-instead-of-cru-by-default.patch new file mode 100644 index 0000000000..447640cef6 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/ARFLAGS-use-cr-instead-of-cru-by-default.patch @@ -0,0 +1,133 @@ +From 418129bc63afc312701e84cb8afa5ca413df1ab5 Mon Sep 17 00:00:00 2001 +From: Pavel Raiskup <praiskup@redhat.com> +Date: Fri, 17 Apr 2015 16:54:58 +0200 +Subject: ARFLAGS: use 'cr' instead of 'cru' by default + +In some GNU/Linux distributions people started to compile 'ar' +binary with --enable-deterministic-archives (binutils project). +That, however, in combination with our previous long time working +default AR_FLAGS=cru causes warnings on such installations: +ar: `u' modifier ignored since `D' is the default (see `U') + +The 'u' option (at least with GNU binutils) did small optimization +during repeated builds because it instructed 'ar' to not +open/close unchanged *.o files and to rather read their contents +from old archive file. However, its removal should not cause a +big performance hit for usual workflows. + +Distributions started using --enable-deterministic-archives +knowing that it would disable the 'u', just to rather have a bit +more deterministic builds. + +Also, to justify this change a bit more, keeping 'u' in ARFLAGS +could only result in many per-project changes to override +Libtool's ARFLAGS default, just to silent such warnings. + +Fixes bug#19967. Reported by Eric Blake. + +* m4/libtool.m4 (_LT_PROG_AR): Default AR_FLAGS to 'cr'. +(_LT_REQUIRED_DARWIN_CHECKS): Use $AR_FLAGS instead 'cru' string. +* doc/libtool.texi: Do 's/ar cru/ar cr/' in whole documentation. +* NEWS: Document. + +Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=418129bc63afc312701e84cb8afa5ca413df1ab5] + +Signed-off-by: Li Wang <li.wang@windriver.com> +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + NEWS | 4 ++++ + doc/libtool.texi | 10 +++++----- + m4/libtool.m4 | 6 +++--- + 3 files changed, 12 insertions(+), 8 deletions(-) + +diff --git a/NEWS b/NEWS +index 71a932d..1518f09 100644 +--- a/NEWS ++++ b/NEWS +@@ -13,6 +13,10 @@ NEWS - list of user-visible changes between releases of GNU Libtool + variable, which obsoletes AR_FLAGS. This is due to naming conventions + among other *FLAGS and to be consistent with Automake's ARFLAGS. + ++** Important incompatible changes: ++ ++ - Libtool changed ARFLAGS/AR_FLAGS default from 'cru' to 'cr'. ++ + ** Bug fixes: + + - Fix a race condition in ltdl dryrun test that would cause spurious +diff --git a/doc/libtool.texi b/doc/libtool.texi +index 0298627..4c664bb 100644 +--- a/doc/libtool.texi ++++ b/doc/libtool.texi +@@ -602,7 +602,7 @@ Without libtool, the programmer would invoke the @command{ar} command to + create a static library: + + @example +-burger$ @kbd{ar cru libhello.a hello.o foo.o} ++burger$ @kbd{ar cr libhello.a hello.o foo.o} + burger$ + @end example + +@@ -632,7 +632,7 @@ libtool are the same ones you would use to produce an executable named + a23$ @kbd{libtool --mode=link gcc -g -O -o libhello.la foo.o hello.o} + *** Warning: Linking the shared library libhello.la against the + *** non-libtool objects foo.o hello.o is not portable! +-ar cru .libs/libhello.a ++ar cr .libs/libhello.a + ranlib .libs/libhello.a + creating libhello.la + (cd .libs && rm -f libhello.la && ln -s ../libhello.la libhello.la) +@@ -662,7 +662,7 @@ archive, not a shared library (@pxref{Static libraries}).}: + @example + a23$ @kbd{libtool --mode=link gcc -g -O -o libhello.la foo.lo hello.lo \ + -rpath /usr/local/lib -lm} +-ar cru @value{objdir}/libhello.a foo.o hello.o ++ar cr @value{objdir}/libhello.a foo.o hello.o + ranlib @value{objdir}/libhello.a + creating libhello.la + (cd @value{objdir} && rm -f libhello.la && ln -s ../libhello.la libhello.la) +@@ -676,7 +676,7 @@ burger$ @kbd{libtool --mode=link gcc -g -O -o libhello.la foo.lo hello.lo \ + -rpath /usr/local/lib -lm} + rm -fr @value{objdir}/libhello.a @value{objdir}/libhello.la + ld -Bshareable -o @value{objdir}/libhello.so.0.0 @value{objdir}/foo.o @value{objdir}/hello.o -lm +-ar cru @value{objdir}/libhello.a foo.o hello.o ++ar cr @value{objdir}/libhello.a foo.o hello.o + ranlib @value{objdir}/libhello.a + creating libhello.la + (cd @value{objdir} && rm -f libhello.la && ln -s ../libhello.la libhello.la) +@@ -6001,7 +6001,7 @@ in cases where it is necessary. + @subsection Archivers + + On all known systems, building a static library can be accomplished by +-running @kbd{ar cru lib@var{name}.a @var{obj1}.o @var{obj2}.o @dots{}}, ++running @kbd{ar cr lib@var{name}.a @var{obj1}.o @var{obj2}.o @dots{}}, + where the @file{.a} file is the output library, and each @file{.o} file is an + object file. + +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index 6514196..add06ee 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -1041,8 +1041,8 @@ int forced_loaded() { return 2;} + _LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD +- echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD +- $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD ++ echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD ++ $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +@@ -1505,7 +1505,7 @@ _LT_DECL([], [AR], [1], [The archiver]) + # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS + # variable obsoleted/removed. + +-test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cru} ++test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} + lt_ar_flags=$AR_FLAGS + _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) + +-- +2.23.0 + diff --git a/meta/recipes-devtools/libtool/libtool/fixinstall.patch b/meta/recipes-devtools/libtool/libtool/fixinstall.patch index 8f343bf436..48330d82fb 100644 --- a/meta/recipes-devtools/libtool/libtool/fixinstall.patch +++ b/meta/recipes-devtools/libtool/libtool/fixinstall.patch @@ -27,9 +27,9 @@ diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in - if test -n "$relink_command"; then + if test "$fast_install" = no && test -n "$relink_command"; then - # Strip any trailing slash from the destination. - func_stripname '' '/' "$libdir" - destlibdir=$func_stripname_result + # Strip any trailing slash from the destination. + func_stripname '' '/' "$libdir" + destlibdir=$func_stripname_result @@ -2394,7 +2394,7 @@ func_mode_install () shift diff --git a/meta/recipes-devtools/libtool/libtool/libool.m4-add-ARFLAGS-variable.patch b/meta/recipes-devtools/libtool/libtool/libool.m4-add-ARFLAGS-variable.patch new file mode 100644 index 0000000000..bb11887cda --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/libool.m4-add-ARFLAGS-variable.patch @@ -0,0 +1,77 @@ +From 4335de1dfb7d2ec728427e07a54136b94a2d40f6 Mon Sep 17 00:00:00 2001 +From: Pavel Raiskup <praiskup@redhat.com> +Date: Fri, 17 Apr 2015 15:05:42 +0200 +Subject: libool.m4: add ARFLAGS variable + +Libtool has used $AR_FLAGS since 2000-05-29 commit +8300de4c54e6f04f0d, Automake ARFLAGS since 2003-04-06 commit +a71b3490639831ca. Even though ARFLAGS is younger, it sounds like +better name according GNU Coding Standards. + +Related to bug#20082. + +* m4/libtool.m4 (_LT_PROG_AR): Copy ARFLAGS value into AR_FLAGS +variable if AR_FLAGS is not set. Add new _LT_DECL'ed variable +'lt_ar_flags' to keep the configure-time value of AR_FLAGS. The +new 'lt_ar_flags' is to be used as the default value for AR_FLAGS +at libtool-runtime. +* NEWS: Document. + +Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/libtool.git/commit/?id=4335de1dfb7d2ec728427e07a54136b94a2d40f6] + +Signed-off-by: Li Wang <li.wang@windriver.com> +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + NEWS | 6 ++++++ + m4/libtool.m4 | 17 +++++++++++++++-- + 2 files changed, 21 insertions(+), 2 deletions(-) + +diff --git a/NEWS b/NEWS +index d7ca434..71a932d 100644 +--- a/NEWS ++++ b/NEWS +@@ -7,6 +7,12 @@ NEWS - list of user-visible changes between releases of GNU Libtool + - LT_SYS_LIBRARY_PATH can be set in config.site, or at configure time + and persists correctly in the generated libtool script. + ++** New features: ++ ++ - Libtool script now supports (configure-time and runtime) ARFLAGS ++ variable, which obsoletes AR_FLAGS. This is due to naming conventions ++ among other *FLAGS and to be consistent with Automake's ARFLAGS. ++ + ** Bug fixes: + + - Fix a race condition in ltdl dryrun test that would cause spurious +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index 63acd09..6514196 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -1497,9 +1497,22 @@ need_locks=$enable_libtool_lock + m4_defun([_LT_PROG_AR], + [AC_CHECK_TOOLS(AR, [ar], false) + : ${AR=ar} +-: ${AR_FLAGS=cru} + _LT_DECL([], [AR], [1], [The archiver]) +-_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) ++ ++# Use ARFLAGS variable as AR's operation code to sync the variable naming with ++# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have ++# higher priority because thats what people were doing historically (setting ++# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS ++# variable obsoleted/removed. ++ ++test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cru} ++lt_ar_flags=$AR_FLAGS ++_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) ++ ++# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override ++# by AR_FLAGS because that was never working and AR_FLAGS is about to die. ++_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], ++ [Flags to create an archive]) + + AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no +-- +2.23.0 + diff --git a/meta/recipes-devtools/libtool/libtool/norm-rpath.patch b/meta/recipes-devtools/libtool/libtool/norm-rpath.patch deleted file mode 100644 index 1e4c65e024..0000000000 --- a/meta/recipes-devtools/libtool/libtool/norm-rpath.patch +++ /dev/null @@ -1,38 +0,0 @@ -libtool: normalize link paths before considering for RPATH - -Libtool may be passed link paths of the form "/usr/lib/../lib", which -fool its detection code into thinking it should be included as an -RPATH in the generated binary. Normalize before comparision. - -Signed-off-by: Andy Ross <andy.ross@windriver.com> -Upstream-Status: Pending - -Updated by: Robert Yang <liezhi.yang@windriver.com> - -diff -ur a/build-aux/ltmain.in b/build-aux/ltmain.in ---- a/build-aux/ltmain.in 2012-08-16 13:58:55.058900363 -0700 -+++ b/build-aux/ltmain.in 2012-08-22 11:01:34.191345989 -0700 -@@ -7288,8 +7288,10 @@ - else - # We only want to hardcode in an rpath if it isn't in the - # default dlsearch path. -+ func_normal_abspath "$libdir" -+ libdir_norm=$func_normal_abspath_result - case " $sys_lib_dlsearch_path " in -- *" $libdir "*) ;; -+ *" $libdir_norm "*) ;; - *) eval flag=\"$hardcode_libdir_flag_spec\" - func_append dep_rpath " $flag" - ;; -@@ -8027,8 +8029,10 @@ - else - # We only want to hardcode in an rpath if it isn't in the - # default dlsearch path. -+ func_normal_abspath "$libdir" -+ libdir_norm=$func_normal_abspath_result - case " $sys_lib_dlsearch_path " in -- *" $libdir "*) ;; -+ *" $libdir_norm "*) ;; - *) eval flag=\"$hardcode_libdir_flag_spec\" - rpath+=" $flag" - ;; diff --git a/meta/recipes-devtools/libtool/libtool/prefix.patch b/meta/recipes-devtools/libtool/libtool/prefix.patch deleted file mode 100644 index a73df2e4a7..0000000000 --- a/meta/recipes-devtools/libtool/libtool/prefix.patch +++ /dev/null @@ -1,98 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -Renames "libtool" -> "${TARGET_PREFIX}libtool" which makes sure -it can't be confused with the host libtool. - -Originally by: RP - -Updated: Date: 2010/06/28 -Nitin A Kamble <nitin.a.kamble@intel.com> - -It also adjusts libtool so that the header at the script is used for -script execution and not thevalue of $SHELL. This is because many -Makefiles change $SHELL so dash can get used to execute what is -otherwise configured as a bash shell script. Since we don't need to -execute scipts this way on any system I'm aware of us building upon, -the simplest fix is just to remove $SHELL. - -Updated: Date: 2011/11/09 -RP - -Updated by: Robert Yang <liezhi.yang@windriver.com> - -diff --git a/Makefile.am b/Makefile.am ---- a/Makefile.am -+++ b/Makefile.am -@@ -31,7 +31,7 @@ SUBDIRS = . - DIST_SUBDIRS = $(SUBDIRS) - EXTRA_DIST = - --BUILT_SOURCES = libtool libtoolize -+BUILT_SOURCES = $(host_alias)-libtool libtoolize - - CLEANFILES = - MOSTLYCLEANFILES = -@@ -67,7 +67,7 @@ build_scripts = $(srcdir)/$(aux_dir)/announce-gen \ - - EXTRA_DIST += bootstrap bootstrap.conf $(build_scripts) cfg.mk maint.mk \ - GNUmakefile --CLEANFILES += libtool libtoolize -+CLEANFILES += $(host_alias)-libtool libtoolize - - ## If a file is named several times below, and especially if it - ## is a distributed file created during Libtool bootstrap, we -@@ -276,7 +276,7 @@ configure_edit = $(bootstrap_edit) \ - -e 's|@srcdir\@|$(srcdir)|g' - - # The libtool distributor and the standalone libtool script. --bin_SCRIPTS = libtool -+bin_SCRIPTS = $(host_alias)-libtool - - libtoolize: $(libtoolize_in) $(config_status) - $(AM_V_at)rm -f '$@' -@@ -287,7 +287,7 @@ libtoolize: $(libtoolize_in) $(config_status) - # We used to do this with a 'stamp-vcl' file, but non-gmake builds - # would rerun configure on every invocation, so now we manually - # check the version numbers from the build rule when necessary. --libtool: $(ltmain_sh) $(config_status) $(dotversion) -+$(host_alias)-libtool: $(ltmain_sh) $(config_status) $(dotversion) - @$(rebuild); \ - if test -f '$@'; then \ - eval `'$(SED)' -n '/^package_revision=/p' '$@'`; \ -@@ -731,12 +731,12 @@ TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \ - - BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \ - LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \ -- LIBTOOL="$(abs_top_builddir)/libtool" \ -+ LIBTOOL="$(abs_top_builddir)/$(host_alias)-libtool" \ - tst_aclocaldir="$(abs_top_srcdir)/m4" - - INSTALLCHECK_ENVIRONMENT = \ - LIBTOOLIZE="$(bindir)/`echo libtoolize |$(SED) '$(program_transform_name)'`" \ -- LIBTOOL="$(bindir)/`echo libtool |$(SED) '$(program_transform_name)'`" \ -+ LIBTOOL="$(bindir)/`echo $(host_alias)-libtool |$(SED) '$(program_transform_name)'`" \ - LTDLINCL="-I$(includedir)" \ - LIBLTDL="$(libdir)/libltdl.la" \ - tst_aclocaldir="$(aclocaldir)" -diff --git a/m4/libtool.m4 b/m4/libtool.m4 ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -86,7 +86,8 @@ _LT_SET_OPTIONS([$0], [$1]) - LIBTOOL_DEPS=$ltmain - - # Always use our own libtool. --LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+LIBTOOL='$(top_builddir)' -+LIBTOOL="$LIBTOOL/${host_alias}-libtool" - AC_SUBST(LIBTOOL)dnl - - _LT_SETUP -@@ -199,7 +200,7 @@ aix3*) - esac - - # Global variables: --ofile=libtool -+ofile=${host_alias}-libtool - can_build_shared=yes - - # All known linkers require a '.a' archive for static linking (except MSVC, diff --git a/meta/recipes-devtools/libtool/libtool/trailingslash.patch b/meta/recipes-devtools/libtool/libtool/trailingslash.patch deleted file mode 100644 index e8824d7db9..0000000000 --- a/meta/recipes-devtools/libtool/libtool/trailingslash.patch +++ /dev/null @@ -1,35 +0,0 @@ -Upstream-Status: Pending - -A command like /bin/sh ../../i586-poky-linux-libtool --mode=install /usr/bin/install -c gck-roots-store-standalone.la '/media/data1/builds/poky1/tmp/work/core2-poky-linux/gnome-keyring-2.26.1-r1/image/usr/lib/gnome-keyring/standalone/' fails (e.g. gnome-keyring or pulseaudio) - -This is because libdir has a trailing slash which breaks the comparision. - -RP 2/1/10 - -Merged a patch received from Gary Thomas <gary@mlbassoc.com> - -Date: 2010/07/12 -Nitin A Kamble <nitin.a.kamble@intel.com> - -Updated by: Robert Yang <liezhi.yang@windriver.com> - -diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in ---- a/build-aux/ltmain.in -+++ b/build-aux/ltmain.in -@@ -2356,8 +2356,15 @@ func_mode_install () - func_append dir "$objdir" - - if test -n "$relink_command"; then -+ # Strip any trailing slash from the destination. -+ func_stripname '' '/' "$libdir" -+ destlibdir=$func_stripname_result -+ -+ func_stripname '' '/' "$destdir" -+ s_destdir=$func_stripname_result -+ - # Determine the prefix the user has applied to our future dir. -- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` -+ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that |