From 9bb9a4e8bd408c7a42913aa3e1ec541919b59584 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 25 Oct 2021 19:40:53 +0100 Subject: libtool: Update patchset to match those submitted upstream I went through and cleaned up the headers/descriptions on several of the libtool patchset and submitted (or resubmitted in some cases) them upstream. This patch updates/renames them to match what I did. I did fix some whitespace issues in some of the patches and also merged one case where we had a patch of already patched code. This makes it clear what was submitted and makes resubmission easier if ever needed too. Signed-off-by: Richard Purdie --- meta/recipes-devtools/libtool/libtool-2.4.6.inc | 25 ++- ...-make-sure-autoheader-run-before-autoconf.patch | 35 ----- ...-make-sure-autoheader-run-before-automake.patch | 35 ----- ...ck-for-static-libs-for-internal-compiler-.patch | 37 ----- ...1-libtool-Fix-support-for-NIOS2-processor.patch | 68 --------- ...andle-trailing-slashes-on-install-command.patch | 35 +++++ ...Rename-the-with-sysroot-option-to-avoid-c.patch | 167 +++++++++++++++++++++ ...in.in-Add-missing-sysroot-to-library-path.patch | 24 +++ ...ix-sysroot-paths-being-encoded-into-RPATH.patch | 50 ++++++ ...on-t-encode-RATHS-which-match-default-lin.patch | 72 +++++++++ ...-libtool.m4-Handle-as-a-sysroot-correctly.patch | 44 ++++++ ...7-libtool-Fix-support-for-NIOS2-processor.patch | 69 +++++++++ ...ck-for-static-libs-for-internal-compiler-.patch | 38 +++++ ...-make-sure-autoheader-run-before-autoconf.patch | 35 +++++ ...-make-sure-autoheader-run-before-automake.patch | 36 +++++ ...andle-prefix-map-compiler-options-correct.patch | 26 ++++ ...For-reproducibility-stop-encoding-hostnam.patch | 27 ++++ .../libtool/libtool/debian-no_hostname.patch | 21 --- .../libtool/libtool/fix-final-rpath.patch | 50 ------ .../libtool/libtool/fix-resolve-lt-sysroot.patch | 42 ------ .../libtool/libtool/fix-rpath.patch | 65 -------- .../libtool/libtool/fixinstall.patch | 6 +- .../libtool/libtool/lto-prefix.patch | 22 --- .../libtool/libtool/norm-rpath.patch | 38 ----- .../libtool/libtool/rename-with-sysroot.patch | 166 -------------------- .../libtool/libtool/trailingslash.patch | 35 ----- .../libtool/libtool/use-sysroot-in-libpath.patch | 22 --- 27 files changed, 638 insertions(+), 652 deletions(-) delete mode 100644 meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-autoconf.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-automake.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/0001-libtool-Check-for-static-libs-for-internal-compiler-.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/0001-libtool-Fix-support-for-NIOS2-processor.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Handle-trailing-slashes-on-install-command.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0003-ltmain.in-Add-missing-sysroot-to-library-path.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0004-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0005-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0008-libtool-Check-for-static-libs-for-internal-compiler-.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0009-Makefile.am-make-sure-autoheader-run-before-autoconf.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0010-Makefile.am-make-sure-autoheader-run-before-automake.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0011-ltmain.in-Handle-prefix-map-compiler-options-correct.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0012-libtool.m4-For-reproducibility-stop-encoding-hostnam.patch delete mode 100755 meta/recipes-devtools/libtool/libtool/debian-no_hostname.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/fix-rpath.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/lto-prefix.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/norm-rpath.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/trailingslash.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch (limited to 'meta/recipes-devtools/libtool') diff --git a/meta/recipes-devtools/libtool/libtool-2.4.6.inc b/meta/recipes-devtools/libtool/libtool-2.4.6.inc index 7104c98c20..2df46aa773 100644 --- a/meta/recipes-devtools/libtool/libtool-2.4.6.inc +++ b/meta/recipes-devtools/libtool/libtool-2.4.6.inc @@ -9,22 +9,21 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://libltdl/COPYING.LIB;md5=4fbd65380cdd255951079008b364516c " SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \ - file://trailingslash.patch \ - file://rename-with-sysroot.patch \ - file://use-sysroot-in-libpath.patch \ - file://fix-final-rpath.patch \ - file://fix-rpath.patch \ - file://norm-rpath.patch \ + file://0001-ltmain.in-Handle-trailing-slashes-on-install-command.patch \ + file://0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch \ + file://0003-ltmain.in-Add-missing-sysroot-to-library-path.patch \ + file://0004-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch \ + file://0005-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch \ file://dont-depend-on-help2man.patch \ - file://fix-resolve-lt-sysroot.patch \ + file://0006-libtool.m4-Handle-as-a-sysroot-correctly.patch \ file://nohardcodepaths.patch \ file://unwind-opt-parsing.patch \ - file://0001-libtool-Fix-support-for-NIOS2-processor.patch \ - file://0001-libtool-Check-for-static-libs-for-internal-compiler-.patch \ - file://0001-Makefile.am-make-sure-autoheader-run-before-autoconf.patch \ - file://0001-Makefile.am-make-sure-autoheader-run-before-automake.patch \ - file://lto-prefix.patch \ - file://debian-no_hostname.patch \ + file://0007-libtool-Fix-support-for-NIOS2-processor.patch \ + file://0008-libtool-Check-for-static-libs-for-internal-compiler-.patch \ + file://0009-Makefile.am-make-sure-autoheader-run-before-autoconf.patch \ + file://0010-Makefile.am-make-sure-autoheader-run-before-automake.patch \ + file://0011-ltmain.in-Handle-prefix-map-compiler-options-correct.patch \ + file://0012-libtool.m4-For-reproducibility-stop-encoding-hostnam.patch \ " SRC_URI[md5sum] = "addf44b646ddb4e3919805aa88fa7c5e" diff --git a/meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-autoconf.patch b/meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-autoconf.patch deleted file mode 100644 index 2e9908725e..0000000000 --- a/meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-autoconf.patch +++ /dev/null @@ -1,35 +0,0 @@ -From dfbbbd359e43e0a55fbea06f2647279ad8761cb9 Mon Sep 17 00:00:00 2001 -From: Mingli Yu -Date: Wed, 24 Mar 2021 03:04:13 +0000 -Subject: [PATCH] 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: - | configure.ac:45: error: required file 'config-h.in' not found - | touch '../libtool-2.4.6/libltdl/config-h.in' - -So make sure autoheader run before autoconf to avoid this race. - -Upstream-Status: Submitted [libtool-patches@gnu.org maillist] - -Signed-off-by: Mingli Yu ---- - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index 4142c90..fe1a9fc 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -365,7 +365,7 @@ lt_configure_deps = $(lt_aclocal_m4) $(lt_aclocal_m4_deps) - $(lt_aclocal_m4): $(lt_aclocal_m4_deps) - $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(ACLOCAL) -I ../m4 - --$(lt_configure): $(lt_configure_deps) -+$(lt_configure): $(lt_configure_deps) $(lt_config_h_in) - $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOCONF) - - $(lt_config_h_in): $(lt_configure_deps) --- -2.29.2 - diff --git a/meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-automake.patch b/meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-automake.patch deleted file mode 100644 index 87f8492346..0000000000 --- a/meta/recipes-devtools/libtool/libtool/0001-Makefile.am-make-sure-autoheader-run-before-automake.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e82c06584f02e3e4487aa73aa05981e2a35dc6d1 Mon Sep 17 00:00:00 2001 -From: Mingli Yu -Date: Tue, 13 Apr 2021 07:17:29 +0000 -Subject: [PATCH] Makefile.am: make sure autoheader run before automake - -When use automake to generate Makefile.in from Makefile.am, there -comes below race: - | configure.ac:45: error: required file 'config-h.in' not found - -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 ---- - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index 2752ecc..29950db 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -328,7 +328,7 @@ EXTRA_DIST += $(lt_aclocal_m4) \ - $(lt_obsolete_m4) \ - $(stamp_mk) - --$(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4) -+$(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4) $(lt_config_h_in) - $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOMAKE) Makefile - - # Don't let unused scripts leak into the libltdl Makefile --- -2.29.2 - diff --git a/meta/recipes-devtools/libtool/libtool/0001-libtool-Check-for-static-libs-for-internal-compiler-.patch b/meta/recipes-devtools/libtool/libtool/0001-libtool-Check-for-static-libs-for-internal-compiler-.patch deleted file mode 100644 index 8c7c39feb6..0000000000 --- a/meta/recipes-devtools/libtool/libtool/0001-libtool-Check-for-static-libs-for-internal-compiler-.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 40a2da75e6d95cc7c498ebda95ab19ae0db2ebfb Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 26 Jan 2019 12:54:26 -0800 -Subject: [PATCH] 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 -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 - -Upstream-Status: Submitted [https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866] - -Signed-off-by: Khem Raj ---- - m4/libtool.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/m4/libtool.m4 b/m4/libtool.m4 -index d0389a0..9619c57 100644 ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -7536,7 +7536,7 @@ if AC_TRY_EVAL(ac_compile); then - for p in `eval "$output_verbose_link_cmd"`; do - case $prev$p in - -- -L* | -R* | -l*) -+ -L* | -R* | -l* | */libclang_rt.*.a) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test x-L = "$p" || --- -2.20.1 - diff --git a/meta/recipes-devtools/libtool/libtool/0001-libtool-Fix-support-for-NIOS2-processor.patch b/meta/recipes-devtools/libtool/libtool/0001-libtool-Fix-support-for-NIOS2-processor.patch deleted file mode 100644 index bbd36d8dc1..0000000000 --- a/meta/recipes-devtools/libtool/libtool/0001-libtool-Fix-support-for-NIOS2-processor.patch +++ /dev/null @@ -1,68 +0,0 @@ -From df2cd898e48208f26320d40c3ed6b19c75c27142 Mon Sep 17 00:00:00 2001 -From: Marek Vasut -Date: Thu, 17 Sep 2015 00:43:15 +0200 -Subject: [PATCH] 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, -in particular the *os2* branches of switch statements match for -the nios2 string, which results in incorrect behavior of libtool. - -This patch adds an explicit check for *nios2* before the *os2* -checks to prevent the OS/2 check incorrectly trapping the nios2 -as well. - -Signed-off-by: Marek Vasut -Upstream-Status: Submitted ---- - build-aux/ltmain.in | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in -index d5cf07a..4164284 100644 ---- a/build-aux/ltmain.in -+++ b/build-aux/ltmain.in -@@ -504,6 +504,12 @@ libtool_validate_options () - test : = "$debug_cmd" || func_append preserve_args " --debug" - - case $host in -+ # For NIOS2, we want to make sure that it's not caught by the -+ # more general OS/2 check below. Otherwise, NIOS2 is the same -+ # as the default option. -+ *nios2*) -+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps -+ ;; - # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 - # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 - *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) -@@ -6220,6 +6226,15 @@ func_mode_link () - if test -n "$library_names" && - { test no = "$use_static_libs" || test -z "$old_library"; }; then - case $host in -+ *nios2*) -+ # For NIOS2, we want to make sure that it's not caught by the -+ # more general OS/2 check below. Otherwise, NIOS2 is the same -+ # as the default option. -+ if test no = "$installed"; then -+ func_append notinst_deplibs " $lib" -+ need_relink=yes -+ fi -+ ;; - *cygwin* | *mingw* | *cegcc* | *os2*) - # No point in relinking DLLs because paths are not encoded - func_append notinst_deplibs " $lib" -@@ -6290,6 +6305,11 @@ func_mode_link () - elif test -n "$soname_spec"; then - # bleh windows - case $host in -+ *nios2*) -+ # For NIOS2, we want to make sure that it's not caught by the -+ # more general OS/2 check below. Otherwise, NIOS2 is the same -+ # as the default option. -+ ;; - *cygwin* | mingw* | *cegcc* | *os2*) - func_arith $current - $age - major=$func_arith_result --- -2.5.1 - 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 +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 + +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/0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch b/meta/recipes-devtools/libtool/libtool/0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch new file mode 100644 index 0000000000..6da283959e --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0002-libtool.m4-Rename-the-with-sysroot-option-to-avoid-c.patch @@ -0,0 +1,167 @@ +From: Khem Raj +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 since these componets also add that option to configure +and this becomes confusing and conflicting otherwise. + +Signed-off-by: Richard Purdie + +Upstream report: +http://lists.gnu.org/archive/html/libtool/2010-10/msg00048.html + +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 ++++ b/m4/libtool.m4 +@@ -1215,28 +1215,28 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) + # ---------------- + AC_DEFUN([_LT_WITH_SYSROOT], + [AC_MSG_CHECKING([for sysroot]) +-AC_ARG_WITH([sysroot], +-[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], ++AC_ARG_WITH([libtool-sysroot], ++[AS_HELP_STRING([--with-libtool-sysroot@<:@=DIR@:>@], + [Search for dependent libraries within DIR (or the compiler's sysroot + if not specified).])], +-[], [with_sysroot=no]) ++[], [with_libtool_sysroot=no]) + + dnl lt_sysroot will always be passed unquoted. We quote it here + dnl in case the user passed a directory name. + lt_sysroot= +-case $with_sysroot in #( ++case $with_libtool_sysroot in #( + yes) + if test yes = "$GCC"; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) +- lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ++ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) +- AC_MSG_RESULT([$with_sysroot]) ++ AC_MSG_RESULT([$with_libtool_sysroot]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; + esac +diff --git a/tests/sysroot.at b/tests/sysroot.at +--- a/tests/sysroot.at ++++ b/tests/sysroot.at +@@ -64,7 +64,7 @@ while read file; do + done]) + + LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" +-configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" ++configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix" + + #??? + if test PATH = "$shlibpath_var"; then +@@ -114,7 +114,7 @@ AM_INIT_AUTOMAKE([foreign]) + AC_PROG_CC + AC_CONFIG_SRCDIR([lib2.c]) + LT_INIT +-sysroot=$with_sysroot ++sysroot=$with_libtool_sysroot + AC_SUBST([sysroot]) + AC_OUTPUT(Makefile) + ]]) +@@ -155,7 +155,7 @@ AM_INIT_AUTOMAKE([foreign]) + AC_PROG_CC + AC_CONFIG_SRCDIR([prog.c]) + LT_INIT +-sysroot=$with_sysroot ++sysroot=$with_libtool_sysroot + AC_SUBST([sysroot]) + AC_OUTPUT(Makefile) + ]]) +diff --git a/tests/testsuite b/tests/testsuite +--- a/tests/testsuite ++++ b/tests/testsuite +@@ -48945,7 +48945,7 @@ $at_traceon; } + + + LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" +-configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" ++configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix" + + #??? + if test PATH = "$shlibpath_var"; then +@@ -49154,7 +49154,7 @@ AM_INIT_AUTOMAKE([foreign]) + AC_PROG_CC + AC_CONFIG_SRCDIR([lib2.c]) + LT_INIT +-sysroot=$with_sysroot ++sysroot=$with_libtool_sysroot + AC_SUBST([sysroot]) + AC_OUTPUT(Makefile) + _ATEOF +@@ -49342,7 +49342,7 @@ AM_INIT_AUTOMAKE([foreign]) + AC_PROG_CC + AC_CONFIG_SRCDIR([prog.c]) + LT_INIT +-sysroot=$with_sysroot ++sysroot=$with_libtool_sysroot + AC_SUBST([sysroot]) + AC_OUTPUT(Makefile) + _ATEOF +@@ -49694,7 +49694,7 @@ $at_traceon; } + + + LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" +-configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" ++configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix" + + #??? + if test PATH = "$shlibpath_var"; then +@@ -49903,7 +49903,7 @@ AM_INIT_AUTOMAKE([foreign]) + AC_PROG_CC + AC_CONFIG_SRCDIR([lib2.c]) + LT_INIT +-sysroot=$with_sysroot ++sysroot=$with_libtool_sysroot + AC_SUBST([sysroot]) + AC_OUTPUT(Makefile) + _ATEOF +@@ -50091,7 +50091,7 @@ AM_INIT_AUTOMAKE([foreign]) + AC_PROG_CC + AC_CONFIG_SRCDIR([prog.c]) + LT_INIT +-sysroot=$with_sysroot ++sysroot=$with_libtool_sysroot + AC_SUBST([sysroot]) + AC_OUTPUT(Makefile) + _ATEOF +@@ -50443,7 +50443,7 @@ $at_traceon; } + + + LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" +-configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" ++configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix" + + #??? + if test PATH = "$shlibpath_var"; then +@@ -50652,7 +50652,7 @@ AM_INIT_AUTOMAKE([foreign]) + AC_PROG_CC + AC_CONFIG_SRCDIR([lib2.c]) + LT_INIT +-sysroot=$with_sysroot ++sysroot=$with_libtool_sysroot + AC_SUBST([sysroot]) + AC_OUTPUT(Makefile) + _ATEOF +@@ -50840,7 +50840,7 @@ AM_INIT_AUTOMAKE([foreign]) + AC_PROG_CC + AC_CONFIG_SRCDIR([prog.c]) + LT_INIT +-sysroot=$with_sysroot ++sysroot=$with_libtool_sysroot + AC_SUBST([sysroot]) + AC_OUTPUT(Makefile) + _ATEOF diff --git a/meta/recipes-devtools/libtool/libtool/0003-ltmain.in-Add-missing-sysroot-to-library-path.patch b/meta/recipes-devtools/libtool/libtool/0003-ltmain.in-Add-missing-sysroot-to-library-path.patch new file mode 100644 index 0000000000..0103a00451 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0003-ltmain.in-Add-missing-sysroot-to-library-path.patch @@ -0,0 +1,24 @@ +From: Khem Raj +Subject: [PATCH 03/12] ltmain.in: Add missing sysroot to library path + +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. + +Signed-off-by: Richard Purdie + +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 ++++ b/build-aux/ltmain.in +@@ -6421,7 +6421,7 @@ func_mode_link () + fi + else + # We cannot seem to hardcode it, guess we'll fake it. +- add_dir=-L$libdir ++ add_dir="-L$lt_sysroot$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in diff --git a/meta/recipes-devtools/libtool/libtool/0004-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch b/meta/recipes-devtools/libtool/libtool/0004-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch new file mode 100644 index 0000000000..21b3dfe306 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0004-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch @@ -0,0 +1,50 @@ +From: Richard Purdie +Subject: [PATCH 04/12] ltmain.sh: Fix sysroot paths being encoded into RPATHs + +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. + +Signed-off-by: Richard Purdie + +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 ++++ b/build-aux/ltmain.in +@@ -7569,9 +7569,11 @@ EOF + test relink = "$opt_mode" || rpath=$compile_rpath$rpath + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then ++ func_replace_sysroot "$libdir" ++ libdir=$func_replace_sysroot_result ++ func_stripname '=' '' "$libdir" ++ libdir=$func_stripname_result + if test -n "$hardcode_libdir_separator"; then +- func_replace_sysroot "$libdir" +- libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir + else +@@ -8301,6 +8303,10 @@ EOF + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then ++ func_replace_sysroot "$libdir" ++ libdir=$func_replace_sysroot_result ++ func_stripname '=' '' "$libdir" ++ libdir=$func_stripname_result + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir +@@ -8352,6 +8358,10 @@ EOF + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then ++ func_replace_sysroot "$libdir" ++ libdir=$func_replace_sysroot_result ++ func_stripname '=' '' "$libdir" ++ libdir=$func_stripname_result + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs=$libdir diff --git a/meta/recipes-devtools/libtool/libtool/0005-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch b/meta/recipes-devtools/libtool/libtool/0005-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch new file mode 100644 index 0000000000..50d47d9f7a --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0005-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch @@ -0,0 +1,72 @@ +From: Richard Purdie +Subject: [PATCH 05/12] ltmain.in: Don't encode RATHS which match default linker paths + +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. + +Libtool may be passed link paths of the form "/usr/lib/../lib" so normalize +the paths before comparision. + +Signed-off-by: Richard Purdie + +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 +- eval flag=\"$hardcode_libdir_flag_spec\" +- 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_norm "*) ;; ++ *) eval flag=\"$hardcode_libdir_flag_spec\" ++ func_append dep_rpath " $flag" ++ ;; ++ esac + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in +@@ -8019,8 +8027,16 @@ + esac + fi + else +- eval flag=\"$hardcode_libdir_flag_spec\" +- 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_norm "*) ;; ++ *) eval flag=\"$hardcode_libdir_flag_spec\" ++ rpath+=" $flag" ++ ;; ++ esac + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in +@@ -8070,8 +8086,14 @@ + esac + fi + else +- eval flag=\"$hardcode_libdir_flag_spec\" +- func_append rpath " $flag" ++ # We only want to hardcode in an rpath if it isn't in the ++ # default dlsearch path. ++ case " $sys_lib_dlsearch_path " in ++ *" $libdir "*) ;; ++ *) eval flag=\"$hardcode_libdir_flag_spec\" ++ func_append rpath " $flag" ++ ;; ++ esac + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in diff --git a/meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch b/meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch new file mode 100644 index 0000000000..999971241f --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch @@ -0,0 +1,44 @@ +From: Richard Purdie +Subject: [PATCH 06/12] libtool.m4: Handle "/" as a sysroot correctly + +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. + +Signed-off-by: Richard Purdie + +Upstream Report: +http://lists.gnu.org/archive/html/bug-libtool/2013-09/msg00005.html + +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 ++++ b/m4/libtool.m4 +@@ -1225,16 +1225,21 @@ dnl lt_sysroot will always be passed unquoted. We quote it here + dnl in case the user passed a directory name. + lt_sysroot= + case $with_libtool_sysroot in #( +- yes) ++ no) + if test yes = "$GCC"; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` ++ # Treat "/" the same a an unset sysroot. It seems to be more ++ # compatible across host platforms that way!? ++ if test "$lt_sysroot" = /; then ++ lt_sysroot= ++ fi + fi + ;; #( ++ yes|''|/) ++ ;; #( + /*) + lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` + ;; #( +- no|'') +- ;; #( + *) + AC_MSG_RESULT([$with_libtool_sysroot]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) diff --git a/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch b/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch new file mode 100644 index 0000000000..395464e908 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-support-for-NIOS2-processor.patch @@ -0,0 +1,69 @@ +From: Marek Vasut +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, +in particular the *os2* branches of switch statements match for +the nios2 string, which results in incorrect behavior of libtool. + +This patch adds an explicit check for *nios2* before the *os2* +checks to prevent the OS/2 check incorrectly trapping the nios2 +as well. + +Signed-off-by: Marek Vasut +Signed-off-by: Richard Purdie + +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/build-aux/ltmain.in b/build-aux/ltmain.in +index d5cf07a..4164284 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -504,6 +504,12 @@ libtool_validate_options () + test : = "$debug_cmd" || func_append preserve_args " --debug" + + case $host in ++ # For NIOS2, we want to make sure that it's not caught by the ++ # more general OS/2 check below. Otherwise, NIOS2 is the same ++ # as the default option. ++ *nios2*) ++ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ++ ;; + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) +@@ -6220,6 +6226,15 @@ func_mode_link () + if test -n "$library_names" && + { test no = "$use_static_libs" || test -z "$old_library"; }; then + case $host in ++ *nios2*) ++ # For NIOS2, we want to make sure that it's not caught by the ++ # more general OS/2 check below. Otherwise, NIOS2 is the same ++ # as the default option. ++ if test no = "$installed"; then ++ func_append notinst_deplibs " $lib" ++ need_relink=yes ++ fi ++ ;; + *cygwin* | *mingw* | *cegcc* | *os2*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" +@@ -6290,6 +6305,11 @@ func_mode_link () + elif test -n "$soname_spec"; then + # bleh windows + case $host in ++ *nios2*) ++ # For NIOS2, we want to make sure that it's not caught by the ++ # more general OS/2 check below. Otherwise, NIOS2 is the same ++ # as the default option. ++ ;; + *cygwin* | mingw* | *cegcc* | *os2*) + func_arith $current - $age + major=$func_arith_result +-- +2.5.1 + diff --git a/meta/recipes-devtools/libtool/libtool/0008-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 new file mode 100644 index 0000000000..afffdb9fd4 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0008-libtool-Check-for-static-libs-for-internal-compiler-.patch @@ -0,0 +1,38 @@ +From b9993338080325a6e2b2ec94ca0ece80e7fa3fb6 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 26 Jan 2019 12:54:26 -0800 +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 +path to link its internal libraries e.g. compiler_rt. This patch +handles clang's statically linked libraries when finding internal +compiler libraries. + +Signed-off-by: Khem Raj +Signed-off-by: Richard Purdie + +https://crbug.com/749263 +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866 + +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/m4/libtool.m4 b/m4/libtool.m4 +index d0389a0..9619c57 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -7536,7 +7536,7 @@ if AC_TRY_EVAL(ac_compile); then + for p in `eval "$output_verbose_link_cmd"`; do + case $prev$p in + +- -L* | -R* | -l*) ++ -L* | -R* | -l* | */libclang_rt.*.a) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test x-L = "$p" || +-- +2.20.1 + diff --git a/meta/recipes-devtools/libtool/libtool/0009-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 new file mode 100644 index 0000000000..348cd3c1ae --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0009-Makefile.am-make-sure-autoheader-run-before-autoconf.patch @@ -0,0 +1,35 @@ +From: Mingli Yu +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: + | configure.ac:45: error: required file 'config-h.in' not found + | touch '../libtool-2.4.6/libltdl/config-h.in' + +So make sure autoheader run before autoconf to avoid this race. + +Signed-off-by: Mingli Yu +Signed-off-by: Richard Purdie + +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/Makefile.am b/Makefile.am +index 4142c90..fe1a9fc 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -365,7 +365,7 @@ lt_configure_deps = $(lt_aclocal_m4) $(lt_aclocal_m4_deps) + $(lt_aclocal_m4): $(lt_aclocal_m4_deps) + $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(ACLOCAL) -I ../m4 + +-$(lt_configure): $(lt_configure_deps) ++$(lt_configure): $(lt_configure_deps) $(lt_config_h_in) + $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOCONF) + + $(lt_config_h_in): $(lt_configure_deps) +-- +2.29.2 + diff --git a/meta/recipes-devtools/libtool/libtool/0010-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 new file mode 100644 index 0000000000..cd963ef1be --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0010-Makefile.am-make-sure-autoheader-run-before-automake.patch @@ -0,0 +1,36 @@ +From: Mingli Yu +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: + | configure.ac:45: error: required file 'config-h.in' not found + +It is because the file config-h.in in updating process by autoheader, +so make automake run after autoheader to avoid the above race. + +Signed-off-by: Mingli Yu +Signed-off-by: Richard Purdie + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00020.html] + +Signed-off-by: Mingli Yu +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 2752ecc..29950db 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -328,7 +328,7 @@ EXTRA_DIST += $(lt_aclocal_m4) \ + $(lt_obsolete_m4) \ + $(stamp_mk) + +-$(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4) ++$(lt_Makefile_in): $(lt_Makefile_am) $(lt_aclocal_m4) $(lt_config_h_in) + $(AM_V_GEN)cd '$(srcdir)/$(ltdl_dir)' && $(AUTOMAKE) Makefile + + # Don't let unused scripts leak into the libltdl Makefile +-- +2.29.2 + 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 +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 + +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/0012-libtool.m4-For-reproducibility-stop-encoding-hostnam.patch b/meta/recipes-devtools/libtool/libtool/0012-libtool.m4-For-reproducibility-stop-encoding-hostnam.patch new file mode 100644 index 0000000000..64f911d46c --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0012-libtool.m4-For-reproducibility-stop-encoding-hostnam.patch @@ -0,0 +1,27 @@ +From: Richard Purdie +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 + +https://sources.debian.org/data/main/libt/libtool/2.4.6-10/debian/patches/ + no_hostname.patch + +Upstream-Status: Submitted [https://lists.gnu.org/archive/html/libtool-patches/2021-10/msg00011.html] + +--- +Index: libtool-2.4.6/m4/libtool.m4 +=================================================================== +--- libtool-2.4.6.orig/m4/libtool.m4 ++++ libtool-2.4.6/m4/libtool.m4 +@@ -728,7 +728,6 @@ _LT_CONFIG_SAVE_COMMANDS([ + cat <<_LT_EOF >> "$cfgfile" + #! $SHELL + # Generated automatically by $as_me ($PACKAGE) $VERSION +-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + + # Provide generalized library-building support services. diff --git a/meta/recipes-devtools/libtool/libtool/debian-no_hostname.patch b/meta/recipes-devtools/libtool/libtool/debian-no_hostname.patch deleted file mode 100755 index 5add0cca3b..0000000000 --- a/meta/recipes-devtools/libtool/libtool/debian-no_hostname.patch +++ /dev/null @@ -1,21 +0,0 @@ -libtool: remove host specific info from header file - -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 - ---- -Index: libtool-2.4.6/m4/libtool.m4 -=================================================================== ---- libtool-2.4.6.orig/m4/libtool.m4 -+++ libtool-2.4.6/m4/libtool.m4 -@@ -728,7 +728,6 @@ _LT_CONFIG_SAVE_COMMANDS([ - cat <<_LT_EOF >> "$cfgfile" - #! $SHELL - # Generated automatically by $as_me ($PACKAGE) $VERSION --# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: - # NOTE: Changes made to this file will be lost: look at ltmain.sh. - - # Provide generalized library-building support services. diff --git a/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch b/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch deleted file mode 100644 index 5c9f8cc9c0..0000000000 --- a/meta/recipes-devtools/libtool/libtool/fix-final-rpath.patch +++ /dev/null @@ -1,50 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -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. - -Fix suggested by Richard Purdie -Signed-off-by: Scott Garman -Signed-off-by: Randy Witt -Updated by: Robert Yang - -diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in ---- a/build-aux/ltmain.in -+++ b/build-aux/ltmain.in -@@ -7569,9 +7569,11 @@ EOF - test relink = "$opt_mode" || rpath=$compile_rpath$rpath - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then -+ func_replace_sysroot "$libdir" -+ libdir=$func_replace_sysroot_result -+ func_stripname '=' '' "$libdir" -+ libdir=$func_stripname_result - if test -n "$hardcode_libdir_separator"; then -- func_replace_sysroot "$libdir" -- libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir - else -@@ -8301,6 +8303,10 @@ EOF - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then -+ func_replace_sysroot "$libdir" -+ libdir=$func_replace_sysroot_result -+ func_stripname '=' '' "$libdir" -+ libdir=$func_stripname_result - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir -@@ -8352,6 +8358,10 @@ EOF - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then -+ func_replace_sysroot "$libdir" -+ libdir=$func_replace_sysroot_result -+ func_stripname '=' '' "$libdir" -+ libdir=$func_stripname_result - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs=$libdir diff --git a/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch b/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch deleted file mode 100644 index 1bd95980c0..0000000000 --- a/meta/recipes-devtools/libtool/libtool/fix-resolve-lt-sysroot.patch +++ /dev/null @@ -1,42 +0,0 @@ -Upstream-Status: Pending - -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. - -I have also reported the problem to libtool here - -http://lists.gnu.org/archive/html/bug-libtool/2013-09/msg00005.html - -Signed-off-by: Hans Beckerus -Updated by: Robert Yang ---- -diff --git a/m4/libtool.m4 b/m4/libtool.m4 ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -1225,16 +1225,21 @@ dnl lt_sysroot will always be passed unquoted. We quote it here - dnl in case the user passed a directory name. - lt_sysroot= - case $with_libtool_sysroot in #( -- yes) -+ no) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` -+ # Treat "/" the same a an unset sysroot. It seems to be more -+ # compatible across host platforms that way!? -+ if test "$lt_sysroot" = /; then -+ lt_sysroot= -+ fi - fi - ;; #( -+ yes|''|/) -+ ;; #( - /*) - lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` - ;; #( -- no|'') -- ;; #( - *) - AC_MSG_RESULT([$with_libtool_sysroot]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) diff --git a/meta/recipes-devtools/libtool/libtool/fix-rpath.patch b/meta/recipes-devtools/libtool/libtool/fix-rpath.patch deleted file mode 100644 index a2ec9473e7..0000000000 --- a/meta/recipes-devtools/libtool/libtool/fix-rpath.patch +++ /dev/null @@ -1,65 +0,0 @@ -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. - -RP 23/9/2011 - -Upstream-Status: Pending - -Updated by: Robert Yang - -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 - esac - fi - else -- eval flag=\"$hardcode_libdir_flag_spec\" -- func_append dep_rpath " $flag" -+ # We only want to hardcode in an rpath if it isn't in the -+ # default dlsearch path. -+ case " $sys_lib_dlsearch_path " in -+ *" $libdir "*) ;; -+ *) eval flag=\"$hardcode_libdir_flag_spec\" -+ func_append dep_rpath " $flag" -+ ;; -+ esac - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in -@@ -8019,8 +8025,14 @@ EOF - esac - fi - else -- eval flag=\"$hardcode_libdir_flag_spec\" -- func_append rpath " $flag" -+ # We only want to hardcode in an rpath if it isn't in the -+ # default dlsearch path. -+ case " $sys_lib_dlsearch_path " in -+ *" $libdir "*) ;; -+ *) eval flag=\"$hardcode_libdir_flag_spec\" -+ rpath+=" $flag" -+ ;; -+ esac - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in -@@ -8070,8 +8082,14 @@ EOF - esac - fi - else -- eval flag=\"$hardcode_libdir_flag_spec\" -- func_append rpath " $flag" -+ # We only want to hardcode in an rpath if it isn't in the -+ # default dlsearch path. -+ case " $sys_lib_dlsearch_path " in -+ *" $libdir "*) ;; -+ *) eval flag=\"$hardcode_libdir_flag_spec\" -+ func_append rpath " $flag" -+ ;; -+ esac - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in 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/lto-prefix.patch b/meta/recipes-devtools/libtool/libtool/lto-prefix.patch deleted file mode 100644 index 2bd010b8e4..0000000000 --- a/meta/recipes-devtools/libtool/libtool/lto-prefix.patch +++ /dev/null @@ -1,22 +0,0 @@ -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. - -Upstream-Status: Pending -Signed-off-by: Richard Purdie - -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/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 -Upstream-Status: Pending - -Updated by: Robert Yang - -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/rename-with-sysroot.patch b/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch deleted file mode 100644 index ad2b110530..0000000000 --- a/meta/recipes-devtools/libtool/libtool/rename-with-sysroot.patch +++ /dev/null @@ -1,166 +0,0 @@ -Upstream-Status: Pending - -This patch renames the --with-sysroot option to --with-libtool-sysroot -to avoid namespace conflict with binutils, gcc and other toolchain -components. - -I also reported the problem to libtool here - -http://lists.gnu.org/archive/html/libtool/2010-10/msg00048.html - --Khem Raj - -Updated by: Robert Yang - -diff --git a/m4/libtool.m4 b/m4/libtool.m4 ---- a/m4/libtool.m4 -+++ b/m4/libtool.m4 -@@ -1215,28 +1215,28 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) - # ---------------- - AC_DEFUN([_LT_WITH_SYSROOT], - [AC_MSG_CHECKING([for sysroot]) --AC_ARG_WITH([sysroot], --[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], -+AC_ARG_WITH([libtool-sysroot], -+[AS_HELP_STRING([--with-libtool-sysroot@<:@=DIR@:>@], - [Search for dependent libraries within DIR (or the compiler's sysroot - if not specified).])], --[], [with_sysroot=no]) -+[], [with_libtool_sysroot=no]) - - dnl lt_sysroot will always be passed unquoted. We quote it here - dnl in case the user passed a directory name. - lt_sysroot= --case $with_sysroot in #( -+case $with_libtool_sysroot in #( - yes) - if test yes = "$GCC"; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) -- lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` -+ lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) -- AC_MSG_RESULT([$with_sysroot]) -+ AC_MSG_RESULT([$with_libtool_sysroot]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; - esac -diff --git a/tests/sysroot.at b/tests/sysroot.at ---- a/tests/sysroot.at -+++ b/tests/sysroot.at -@@ -64,7 +64,7 @@ while read file; do - done]) - - LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" --configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" -+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix" - - #??? - if test PATH = "$shlibpath_var"; then -@@ -114,7 +114,7 @@ AM_INIT_AUTOMAKE([foreign]) - AC_PROG_CC - AC_CONFIG_SRCDIR([lib2.c]) - LT_INIT --sysroot=$with_sysroot -+sysroot=$with_libtool_sysroot - AC_SUBST([sysroot]) - AC_OUTPUT(Makefile) - ]]) -@@ -155,7 +155,7 @@ AM_INIT_AUTOMAKE([foreign]) - AC_PROG_CC - AC_CONFIG_SRCDIR([prog.c]) - LT_INIT --sysroot=$with_sysroot -+sysroot=$with_libtool_sysroot - AC_SUBST([sysroot]) - AC_OUTPUT(Makefile) - ]]) -diff --git a/tests/testsuite b/tests/testsuite ---- a/tests/testsuite -+++ b/tests/testsuite -@@ -48945,7 +48945,7 @@ $at_traceon; } - - - LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" --configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" -+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix" - - #??? - if test PATH = "$shlibpath_var"; then -@@ -49154,7 +49154,7 @@ AM_INIT_AUTOMAKE([foreign]) - AC_PROG_CC - AC_CONFIG_SRCDIR([lib2.c]) - LT_INIT --sysroot=$with_sysroot -+sysroot=$with_libtool_sysroot - AC_SUBST([sysroot]) - AC_OUTPUT(Makefile) - _ATEOF -@@ -49342,7 +49342,7 @@ AM_INIT_AUTOMAKE([foreign]) - AC_PROG_CC - AC_CONFIG_SRCDIR([prog.c]) - LT_INIT --sysroot=$with_sysroot -+sysroot=$with_libtool_sysroot - AC_SUBST([sysroot]) - AC_OUTPUT(Makefile) - _ATEOF -@@ -49694,7 +49694,7 @@ $at_traceon; } - - - LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" --configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" -+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix" - - #??? - if test PATH = "$shlibpath_var"; then -@@ -49903,7 +49903,7 @@ AM_INIT_AUTOMAKE([foreign]) - AC_PROG_CC - AC_CONFIG_SRCDIR([lib2.c]) - LT_INIT --sysroot=$with_sysroot -+sysroot=$with_libtool_sysroot - AC_SUBST([sysroot]) - AC_OUTPUT(Makefile) - _ATEOF -@@ -50091,7 +50091,7 @@ AM_INIT_AUTOMAKE([foreign]) - AC_PROG_CC - AC_CONFIG_SRCDIR([prog.c]) - LT_INIT --sysroot=$with_sysroot -+sysroot=$with_libtool_sysroot - AC_SUBST([sysroot]) - AC_OUTPUT(Makefile) - _ATEOF -@@ -50443,7 +50443,7 @@ $at_traceon; } - - - LDFLAGS="$LDFLAGS --sysroot=$sysroot -no-undefined" --configure_options="$configure_options --with-sysroot=$sysroot --prefix=$prefix" -+configure_options="$configure_options --with-libtool-sysroot=$sysroot --prefix=$prefix" - - #??? - if test PATH = "$shlibpath_var"; then -@@ -50652,7 +50652,7 @@ AM_INIT_AUTOMAKE([foreign]) - AC_PROG_CC - AC_CONFIG_SRCDIR([lib2.c]) - LT_INIT --sysroot=$with_sysroot -+sysroot=$with_libtool_sysroot - AC_SUBST([sysroot]) - AC_OUTPUT(Makefile) - _ATEOF -@@ -50840,7 +50840,7 @@ AM_INIT_AUTOMAKE([foreign]) - AC_PROG_CC - AC_CONFIG_SRCDIR([prog.c]) - LT_INIT --sysroot=$with_sysroot -+sysroot=$with_libtool_sysroot - AC_SUBST([sysroot]) - AC_OUTPUT(Makefile) - _ATEOF 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 - -Date: 2010/07/12 -Nitin A Kamble - -Updated by: Robert Yang - -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 diff --git a/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch b/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch deleted file mode 100644 index 6af99f327c..0000000000 --- a/meta/recipes-devtools/libtool/libtool/use-sysroot-in-libpath.patch +++ /dev/null @@ -1,22 +0,0 @@ -Upstream-Status: Pending - -When using 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 -Updated by: Robert Yang - -diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in ---- a/build-aux/ltmain.in -+++ b/build-aux/ltmain.in -@@ -6421,7 +6421,7 @@ func_mode_link () - fi - else - # We cannot seem to hardcode it, guess we'll fake it. -- add_dir=-L$libdir -+ add_dir="-L$lt_sysroot$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in -- cgit 1.2.3-korg