From fca2c9b54ec3352fec2916623599ca7ac1078419 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Wed, 4 Dec 2024 07:49:01 +0100 Subject: libtool: update 2.5.2 -> 2.5.4 2.5.2 was a beta, upstream made two stable releases since: https://savannah.gnu.org/news/?id=10676 https://savannah.gnu.org/news/?id=10693 Drop libtool/0001-ltmain.in-Handle-trailing-slashes-on-install-command.patch (merged upstream) Apply the multilib patch unconditionally as it could be applied to add variants. For the other it was pointed out that it: "potentially has side effects for native builds. It breaks the ability to run files in the .libs directory which in the cross case we don't care about but some natives did once used to do that. The risk is they find host things instead." License-Update: change of FSF address to a URI (From OE-Core rev: 9a672faf21648c60d7ff29439bb236f3ac87100d) Signed-off-by: Alexander Kanavin Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- meta/recipes-devtools/libtool/libtool-2.5.2.inc | 36 ------ meta/recipes-devtools/libtool/libtool-2.5.4.inc | 36 ++++++ .../libtool/libtool-cross_2.5.2.bb | 43 ------- .../libtool/libtool-cross_2.5.4.bb | 43 +++++++ .../libtool/libtool-native_2.5.2.bb | 11 -- .../libtool/libtool-native_2.5.4.bb | 11 ++ ...andle-trailing-slashes-on-install-command.patch | 36 ------ ...ix-sysroot-paths-being-encoded-into-RPATH.patch | 59 ++++++++++ ...on-t-encode-RATHS-which-match-default-lin.patch | 82 ++++++++++++++ .../0003-libtool-remove-help2man-dependency.patch | 44 +++++++ ...Change-libtool-to-handle-sysroots-by-defa.patch | 43 +++++++ ...ix-sysroot-paths-being-encoded-into-RPATH.patch | 51 --------- ...ck-for-static-libs-for-internal-compiler-.patch | 39 +++++++ ...on-t-encode-RATHS-which-match-default-lin.patch | 73 ------------ .../0006-libtool-Fix-tools-path-issues.patch | 40 +++++++ ...-libtool.m4-Handle-as-a-sysroot-correctly.patch | 38 ------- ...l-Fix-problem-with-libtoolize-in-multilib.patch | 34 ++++++ ...id-relinking-when-cross-compiling-its-poi.patch | 126 +++++++++++++++++++++ ...ck-for-static-libs-for-internal-compiler-.patch | 30 ----- .../libtool/libtool/dont-depend-on-help2man.patch | 31 ----- .../libtool/libtool/fixinstall.patch | 111 ------------------ .../libtool/libtool/multilib.patch | 23 ---- .../libtool/libtool/nohardcodepaths.patch | 29 ----- meta/recipes-devtools/libtool/libtool_2.5.2.bb | 21 ---- meta/recipes-devtools/libtool/libtool_2.5.4.bb | 19 ++++ .../libtool/nativesdk-libtool_2.5.2.bb | 24 ---- .../libtool/nativesdk-libtool_2.5.4.bb | 24 ++++ 27 files changed, 600 insertions(+), 557 deletions(-) delete mode 100644 meta/recipes-devtools/libtool/libtool-2.5.2.inc create mode 100644 meta/recipes-devtools/libtool/libtool-2.5.4.inc delete mode 100644 meta/recipes-devtools/libtool/libtool-cross_2.5.2.bb create mode 100644 meta/recipes-devtools/libtool/libtool-cross_2.5.4.bb delete mode 100644 meta/recipes-devtools/libtool/libtool-native_2.5.2.bb create mode 100644 meta/recipes-devtools/libtool/libtool-native_2.5.4.bb delete 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/0001-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0002-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0003-libtool-remove-help2man-dependency.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0004-libtool.m4-Change-libtool-to-handle-sysroots-by-defa.patch delete 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-libtool-Check-for-static-libs-for-internal-compiler-.patch delete 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-Fix-tools-path-issues.patch delete 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-problem-with-libtoolize-in-multilib.patch create mode 100644 meta/recipes-devtools/libtool/libtool/0008-libtool-Avoid-relinking-when-cross-compiling-its-poi.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/0008-libtool-Check-for-static-libs-for-internal-compiler-.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/fixinstall.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/multilib.patch delete mode 100644 meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch delete mode 100644 meta/recipes-devtools/libtool/libtool_2.5.2.bb create mode 100644 meta/recipes-devtools/libtool/libtool_2.5.4.bb delete mode 100644 meta/recipes-devtools/libtool/nativesdk-libtool_2.5.2.bb create mode 100644 meta/recipes-devtools/libtool/nativesdk-libtool_2.5.4.bb diff --git a/meta/recipes-devtools/libtool/libtool-2.5.2.inc b/meta/recipes-devtools/libtool/libtool-2.5.2.inc deleted file mode 100644 index bde80e12ce..0000000000 --- a/meta/recipes-devtools/libtool/libtool-2.5.2.inc +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "Generic library support script" -DESCRIPTION = "This is GNU libtool, a generic library support script. \ -Libtool hides the complexity of generating special library types \ -(such as shared libraries) behind a consistent interface." -HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html" -SECTION = "devel" -LICENSE = "GPL-2.0-only & LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://libltdl/COPYING.LIB;md5=4fbd65380cdd255951079008b364516c " - -SRC_URI = "https://alpha.gnu.org/gnu/libtool/libtool-${PV}.tar.gz \ - file://0001-ltmain.in-Handle-trailing-slashes-on-install-command.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://0006-libtool.m4-Handle-as-a-sysroot-correctly.patch \ - file://0008-libtool-Check-for-static-libs-for-internal-compiler-.patch \ - file://nohardcodepaths.patch \ - " - -SRC_URI[sha256sum] = "29275fb45b236d6ff720a433f9cd5f61ea2f52cc3aa2e5f89ba57726bda54793" - -inherit autotools texinfo -EXTRA_AUTORECONF = "--exclude=libtoolize" - -CACHED_CONFIGUREVARS += "ac_cv_path_GREP=grep" - -DEPENDS = "libtool-native" - -PACKAGES =+ "libltdl" -FILES:${PN} += "${datadir}/aclocal" - -FILES:${PN}-dev:remove = "${datadir}/aclocal" -FILES:libltdl = "${libdir}/libltdl${SOLIBS}" - -export CONFIG_SHELL="/bin/bash" diff --git a/meta/recipes-devtools/libtool/libtool-2.5.4.inc b/meta/recipes-devtools/libtool/libtool-2.5.4.inc new file mode 100644 index 0000000000..6b533a0d00 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool-2.5.4.inc @@ -0,0 +1,36 @@ +SUMMARY = "Generic library support script" +DESCRIPTION = "This is GNU libtool, a generic library support script. \ +Libtool hides the complexity of generating special library types \ +(such as shared libraries) behind a consistent interface." +HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html" +SECTION = "devel" +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=570a9b3749dd0463a1778803b12a6dce \ + file://libltdl/COPYING.LIB;md5=4bf661c1e3793e55c8d1051bc5e0ae21 " + +SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \ + file://0001-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch \ + file://0002-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch \ + file://0003-libtool-remove-help2man-dependency.patch \ + file://0004-libtool.m4-Change-libtool-to-handle-sysroots-by-defa.patch \ + file://0005-libtool-Check-for-static-libs-for-internal-compiler-.patch \ + file://0006-libtool-Fix-tools-path-issues.patch \ + file://0007-libtool-Fix-problem-with-libtoolize-in-multilib.patch \ + " + +SRC_URI[sha256sum] = "da8ebb2ce4dcf46b90098daf962cffa68f4b4f62ea60f798d0ef12929ede6adf" + +inherit autotools texinfo +EXTRA_AUTORECONF = "--exclude=libtoolize" + +CACHED_CONFIGUREVARS += "ac_cv_path_GREP=grep" + +DEPENDS = "libtool-native" + +PACKAGES =+ "libltdl" +FILES:${PN} += "${datadir}/aclocal" + +FILES:${PN}-dev:remove = "${datadir}/aclocal" +FILES:libltdl = "${libdir}/libltdl${SOLIBS}" + +export CONFIG_SHELL="/bin/bash" diff --git a/meta/recipes-devtools/libtool/libtool-cross_2.5.2.bb b/meta/recipes-devtools/libtool/libtool-cross_2.5.2.bb deleted file mode 100644 index 18849cb8ef..0000000000 --- a/meta/recipes-devtools/libtool/libtool-cross_2.5.2.bb +++ /dev/null @@ -1,43 +0,0 @@ -require libtool-${PV}.inc - -PACKAGES = "" -SRC_URI += "file://fixinstall.patch" - -datadir = "${STAGING_DIR_TARGET}${target_datadir}" - -inherit nopackages - -# -# ccache may or may not be INHERITED, we remove references to it so the sstate -# artefact works on a machine where its not present. libtool-cross isn't used -# heavily so any performance issue is minor. -# Find references to LTCC="ccache xxx-gcc" and CC="ccache xxx-gcc" -# -do_install () { - ln -s false ${D} - install -d ${D}${bindir_crossscripts}/ - install -m 0755 libtool ${D}${bindir_crossscripts}/libtool - sed -e 's@^\(predep_objects="\).*@\1"@' \ - -e 's@^\(postdep_objects="\).*@\1"@' \ - -e 's@^CC="ccache.@CC="@' \ - -e 's@^LTCC="ccache.@LTCC="@' \ - -i ${D}${bindir_crossscripts}/libtool - sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/libtool - sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/libtool - GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize - chmod 0755 ${D}${bindir_crossscripts}/libtoolize - install -d ${D}${target_datadir}/libtool/build-aux/ - install -d ${D}${target_datadir}/aclocal/ - install -c ${S}/build-aux/compile ${D}${target_datadir}/libtool/build-aux/ - install -c ${S}/build-aux/config.guess ${D}${target_datadir}/libtool/build-aux/ - install -c ${S}/build-aux/config.sub ${D}${target_datadir}/libtool/build-aux/ - install -c ${S}/build-aux/depcomp ${D}${target_datadir}/libtool/build-aux/ - install -c ${S}/build-aux/install-sh ${D}${target_datadir}/libtool/build-aux/ - install -c ${S}/build-aux/missing ${D}${target_datadir}/libtool/build-aux/ - install -c -m 0644 ${S}/build-aux/ltmain.sh ${D}${target_datadir}/libtool/build-aux/ - install -c -m 0644 ${S}/m4/*.m4 ${D}${target_datadir}/aclocal/ -} - -SYSROOT_DIRS += "${bindir_crossscripts} ${target_datadir}" - -SSTATE_SCAN_FILES += "libtoolize *-libtool" diff --git a/meta/recipes-devtools/libtool/libtool-cross_2.5.4.bb b/meta/recipes-devtools/libtool/libtool-cross_2.5.4.bb new file mode 100644 index 0000000000..33ea706adb --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool-cross_2.5.4.bb @@ -0,0 +1,43 @@ +require libtool-${PV}.inc + +PACKAGES = "" +SRC_URI += "file://0008-libtool-Avoid-relinking-when-cross-compiling-its-poi.patch" + +datadir = "${STAGING_DIR_TARGET}${target_datadir}" + +inherit nopackages + +# +# ccache may or may not be INHERITED, we remove references to it so the sstate +# artefact works on a machine where its not present. libtool-cross isn't used +# heavily so any performance issue is minor. +# Find references to LTCC="ccache xxx-gcc" and CC="ccache xxx-gcc" +# +do_install () { + ln -s false ${D} + install -d ${D}${bindir_crossscripts}/ + install -m 0755 libtool ${D}${bindir_crossscripts}/libtool + sed -e 's@^\(predep_objects="\).*@\1"@' \ + -e 's@^\(postdep_objects="\).*@\1"@' \ + -e 's@^CC="ccache.@CC="@' \ + -e 's@^LTCC="ccache.@LTCC="@' \ + -i ${D}${bindir_crossscripts}/libtool + sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/libtool + sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/libtool + GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize + chmod 0755 ${D}${bindir_crossscripts}/libtoolize + install -d ${D}${target_datadir}/libtool/build-aux/ + install -d ${D}${target_datadir}/aclocal/ + install -c ${S}/build-aux/compile ${D}${target_datadir}/libtool/build-aux/ + install -c ${S}/build-aux/config.guess ${D}${target_datadir}/libtool/build-aux/ + install -c ${S}/build-aux/config.sub ${D}${target_datadir}/libtool/build-aux/ + install -c ${S}/build-aux/depcomp ${D}${target_datadir}/libtool/build-aux/ + install -c ${S}/build-aux/install-sh ${D}${target_datadir}/libtool/build-aux/ + install -c ${S}/build-aux/missing ${D}${target_datadir}/libtool/build-aux/ + install -c -m 0644 ${S}/build-aux/ltmain.sh ${D}${target_datadir}/libtool/build-aux/ + install -c -m 0644 ${S}/m4/*.m4 ${D}${target_datadir}/aclocal/ +} + +SYSROOT_DIRS += "${bindir_crossscripts} ${target_datadir}" + +SSTATE_SCAN_FILES += "libtoolize *-libtool" diff --git a/meta/recipes-devtools/libtool/libtool-native_2.5.2.bb b/meta/recipes-devtools/libtool/libtool-native_2.5.2.bb deleted file mode 100644 index be96b52dd6..0000000000 --- a/meta/recipes-devtools/libtool/libtool-native_2.5.2.bb +++ /dev/null @@ -1,11 +0,0 @@ -require libtool-${PV}.inc - -DEPENDS = "" - -inherit native - -do_install () { - autotools_do_install - install -d ${D}${bindir}/ - install -m 0755 libtool ${D}${bindir}/libtool -} diff --git a/meta/recipes-devtools/libtool/libtool-native_2.5.4.bb b/meta/recipes-devtools/libtool/libtool-native_2.5.4.bb new file mode 100644 index 0000000000..be96b52dd6 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool-native_2.5.4.bb @@ -0,0 +1,11 @@ +require libtool-${PV}.inc + +DEPENDS = "" + +inherit native + +do_install () { + autotools_do_install + install -d ${D}${bindir}/ + install -m 0755 libtool ${D}${bindir}/libtool +} 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 deleted file mode 100644 index d5d906e6b6..0000000000 --- a/meta/recipes-devtools/libtool/libtool/0001-ltmain.in-Handle-trailing-slashes-on-install-command.patch +++ /dev/null @@ -1,36 +0,0 @@ -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] - -Index: libtool-2.5.0/build-aux/ltmain.in -=================================================================== ---- libtool-2.5.0.orig/build-aux/ltmain.in -+++ libtool-2.5.0/build-aux/ltmain.in -@@ -2382,8 +2382,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.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch b/meta/recipes-devtools/libtool/libtool/0001-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch new file mode 100644 index 0000000000..bcffb7d1ae --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0001-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch @@ -0,0 +1,59 @@ +From 16354097285634daf0240d428bc49fba95c3a291 Mon Sep 17 00:00:00 2001 +From: Richard Purdie +Date: Tue, 26 Nov 2024 09:57:35 +0000 +Subject: [PATCH 1/7] 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] +--- + build-aux/ltmain.in | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index fa157775..c31faebd 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -7764,9 +7764,11 @@ func_mode_link () + 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 +@@ -8496,6 +8498,10 @@ func_mode_link () + 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 +@@ -8547,6 +8553,10 @@ func_mode_link () + 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 +-- +2.39.5 + diff --git a/meta/recipes-devtools/libtool/libtool/0002-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch b/meta/recipes-devtools/libtool/libtool/0002-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch new file mode 100644 index 0000000000..2ece455969 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0002-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch @@ -0,0 +1,82 @@ +From 59b6032698d10306ffb3be3cbf76690409d7f9a6 Mon Sep 17 00:00:00 2001 +From: Richard Purdie +Date: Tue, 26 Nov 2024 09:57:36 +0000 +Subject: [PATCH 2/7] 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] +--- + build-aux/ltmain.in | 34 ++++++++++++++++++++++++++++------ + 1 file changed, 28 insertions(+), 6 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index c31faebd..44c7d81e 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -7782,8 +7782,16 @@ func_mode_link () + 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 +@@ -8516,8 +8524,16 @@ func_mode_link () + 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 +@@ -8571,8 +8587,14 @@ func_mode_link () + 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 +-- +2.39.5 + diff --git a/meta/recipes-devtools/libtool/libtool/0003-libtool-remove-help2man-dependency.patch b/meta/recipes-devtools/libtool/libtool/0003-libtool-remove-help2man-dependency.patch new file mode 100644 index 0000000000..b174827eef --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0003-libtool-remove-help2man-dependency.patch @@ -0,0 +1,44 @@ +From e3e8422333239c47ad613e2f41ee04244556d3be Mon Sep 17 00:00:00 2001 +From: Marko Lindqvist +Date: Mon, 7 Jan 2013 01:49:28 +0200 +Subject: [PATCH 3/7] libtool: remove help2man dependency + +Upstream-Status: Inappropriate + +Signed-off-by: Marko Lindqvist +Updated by: Robert Yang +--- + Makefile.am | 17 ----------------- + 1 file changed, 17 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 51c1fbdb..4962c3ad 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -408,23 +408,6 @@ $(notes_txt): $(notes_texi) + $(AM_V_GEN)$(MAKEINFO) -P '$(srcdir)/doc' --no-headers \ + $(MAKEINFOFLAGS) -o '$@' '$(notes_texi)' + +-dist_man1_MANS = $(libtool_1) $(libtoolize_1) +-MAINTAINERCLEANFILES += $(dist_man1_MANS) +-update_mans = \ +- PATH=".$(PATH_SEPARATOR)$$PATH"; export PATH; \ +- $(HELP2MAN) --output='$@' +- +-# It's wrong to make distributed files (e.g. $(libtool_1)) rely on +-# files created in the build tree, so instead we regenerate the +-# manual pages if the sources for the build-tree files we want to +-# run have changed. +-$(libtool_1): $(ltmain_sh) +- $(AM_V_GEN)$(update_mans) -n 'Provide generalized library-building support services' --help-option=--help-all libtool +-$(libtoolize_1): $(libtoolize_in) +- $(AM_V_GEN)$(update_mans) -n 'Prepare a package to use libtool' libtoolize +- +- +- + ## ------------- ## + ## Installation. ## + ## ------------- ## +-- +2.39.5 + diff --git a/meta/recipes-devtools/libtool/libtool/0004-libtool.m4-Change-libtool-to-handle-sysroots-by-defa.patch b/meta/recipes-devtools/libtool/libtool/0004-libtool.m4-Change-libtool-to-handle-sysroots-by-defa.patch new file mode 100644 index 0000000000..e8fc1bff9c --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0004-libtool.m4-Change-libtool-to-handle-sysroots-by-defa.patch @@ -0,0 +1,43 @@ +From 3bb376ff4832e2bd1aaee5530b4b926e3f7407c0 Mon Sep 17 00:00:00 2001 +From: Richard Purdie +Date: Sat, 14 Sep 2013 09:01:38 +0000 +Subject: [PATCH 4/7] libtool.m4: Change libtool to handle sysroots by default + +Rather than using no sysroot by default, always query gcc to obtain the sysroot. + +Signed-off-by: Richard Purdie + +Upstream-Status: Inappropriate [Upstream are unlikely to accept this change of default] +--- + m4/libtool.m4 | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/m4/libtool.m4 b/m4/libtool.m4 +index 8d323b3e..3650c87c 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -1288,18 +1288,18 @@ 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 #( +- yes) ++ no) + if test yes = "$GCC"; then + # Trim trailing / since we'll always append absolute paths and we want + # to avoid //, if only for less confusing output for the user. + lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` + fi + ;; #( ++ yes|''|/) ++ ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` + ;; #( +- no|'') +- ;; #( + *) + AC_MSG_RESULT([$with_sysroot]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) +-- +2.39.5 + 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 deleted file mode 100644 index a6b3313d71..0000000000 --- a/meta/recipes-devtools/libtool/libtool/0004-ltmain.sh-Fix-sysroot-paths-being-encoded-into-RPATH.patch +++ /dev/null @@ -1,51 +0,0 @@ -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] - -Index: libtool-2.5.0/build-aux/ltmain.in -=================================================================== ---- libtool-2.5.0.orig/build-aux/ltmain.in -+++ libtool-2.5.0/build-aux/ltmain.in -@@ -7584,9 +7584,11 @@ func_mode_link () - 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 -@@ -8316,6 +8318,10 @@ func_mode_link () - 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 -@@ -8367,6 +8373,10 @@ func_mode_link () - 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-libtool-Check-for-static-libs-for-internal-compiler-.patch b/meta/recipes-devtools/libtool/libtool/0005-libtool-Check-for-static-libs-for-internal-compiler-.patch new file mode 100644 index 0000000000..5a4411c8e5 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0005-libtool-Check-for-static-libs-for-internal-compiler-.patch @@ -0,0 +1,39 @@ +From 9f16cd0624641e489665415150792d9054af8a7a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 26 Nov 2024 09:57:39 +0000 +Subject: [PATCH 5/7] 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 3650c87c..51493a10 100644 +--- a/m4/libtool.m4 ++++ b/m4/libtool.m4 +@@ -7708,7 +7708,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,l}" and the path. + # Remove the space. + if test x-L = x"$p" || +-- +2.39.5 + 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 deleted file mode 100644 index 54e602f118..0000000000 --- a/meta/recipes-devtools/libtool/libtool/0005-ltmain.in-Don-t-encode-RATHS-which-match-default-lin.patch +++ /dev/null @@ -1,73 +0,0 @@ -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] - -Index: libtool-2.5.0/build-aux/ltmain.in -=================================================================== ---- libtool-2.5.0.orig/build-aux/ltmain.in -+++ libtool-2.5.0/build-aux/ltmain.in -@@ -7602,8 +7602,16 @@ func_mode_link () - 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 -@@ -8336,8 +8344,16 @@ func_mode_link () - 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 -@@ -8391,8 +8407,14 @@ func_mode_link () - 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-Fix-tools-path-issues.patch b/meta/recipes-devtools/libtool/libtool/0006-libtool-Fix-tools-path-issues.patch new file mode 100644 index 0000000000..9788433ab8 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0006-libtool-Fix-tools-path-issues.patch @@ -0,0 +1,40 @@ +From c04839effba0538c982422275c5cda5947aa0e85 Mon Sep 17 00:00:00 2001 +From: Richard Purdie +Date: Tue, 3 Feb 2015 14:24:58 +0000 +Subject: [PATCH 6/7] libtool: Fix tools path issues + +If for example you build on a machine with /bin/grep, then restore that sstate +onto a machine with /usr/bin/grep, things will fail. Simply don't bother +hardcoding paths. + +RP 2015/2/3 + +Upstream-Status: Inappropriate +--- + libtoolize.in | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/libtoolize.in b/libtoolize.in +index 6c15aa57..8beb670e 100644 +--- a/libtoolize.in ++++ b/libtoolize.in +@@ -40,11 +40,11 @@ + + : ${AUTOCONF="autoconf"} + : ${AUTOMAKE="automake"} +-: ${EGREP="@EGREP@"} +-: ${FGREP="@FGREP@"} +-: ${GREP="@GREP@"} +-: ${LN_S="@LN_S@"} +-: ${SED="@SED@"} ++: ${EGREP="egrep"} ++: ${FGREP="fgrep"} ++: ${GREP="grep"} ++: ${LN_S="ln -s"} ++: ${SED="sed"} + + + ## -------------------------- ## +-- +2.39.5 + 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 deleted file mode 100644 index feb1048b55..0000000000 --- a/meta/recipes-devtools/libtool/libtool/0006-libtool.m4-Handle-as-a-sysroot-correctly.patch +++ /dev/null @@ -1,38 +0,0 @@ -libtool.m4: Change libtool to handle sysroots by default - -Rather than using no sysroot by default, always query gcc to obtain the sysroot. - -Signed-off-by: Richard Purdie - -Upstream-Status: Inappropriate [Upstream are unlikely to accept this change of default] - ---- - m4/libtool.m4 | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -Index: libtool-2.5.0/m4/libtool.m4 -=================================================================== ---- libtool-2.5.0.orig/m4/libtool.m4 -+++ libtool-2.5.0/m4/libtool.m4 -@@ -1253,18 +1253,18 @@ dnl lt_sysroot will always be passed unq - dnl in case the user passed a directory name. - lt_sysroot= - case $with_sysroot in #( -- yes) -+ no) - if test yes = "$GCC"; then - # Trim trailing / since we'll always append absolute paths and we want - # to avoid //, if only for less confusing output for the user. - lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` - fi - ;; #( -+ yes|''|/) -+ ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` - ;; #( -- no|'') -- ;; #( - *) - AC_MSG_RESULT([$with_sysroot]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) diff --git a/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-problem-with-libtoolize-in-multilib.patch b/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-problem-with-libtoolize-in-multilib.patch new file mode 100644 index 0000000000..bcb372bbc1 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0007-libtool-Fix-problem-with-libtoolize-in-multilib.patch @@ -0,0 +1,34 @@ +From 083cf39140cd894ea306b67411d6088c13a9e286 Mon Sep 17 00:00:00 2001 +From: Richard Purdie +Date: Mon, 30 Jul 2018 17:00:01 +0000 +Subject: [PATCH 7/7] libtool: Fix problem with libtoolize in multilib + +Without this patch /usr/bin/libtoolize is different for each multilib +since their host-triplets are different, despite there being no difference in +the functionality of libtoolize itself. + +Ugly, but just patch this out. This fixes issues where libtool and +libXX-libtool couldn't be installed into the same system. + +Upstream-Status: Inappropriate +RP 2018/7/30 +--- + libtoolize.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libtoolize.in b/libtoolize.in +index 8beb670e..c89a093c 100644 +--- a/libtoolize.in ++++ b/libtoolize.in +@@ -139,7 +139,7 @@ You must 'cd' to the top directory of your package before you run + When reporting a bug, please describe a test case to reproduce it and + include the following information: + +- host-triplet: @host_triplet@ ++ host-triplet + version: $progname $scriptversion + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` +-- +2.39.5 + diff --git a/meta/recipes-devtools/libtool/libtool/0008-libtool-Avoid-relinking-when-cross-compiling-its-poi.patch b/meta/recipes-devtools/libtool/libtool/0008-libtool-Avoid-relinking-when-cross-compiling-its-poi.patch new file mode 100644 index 0000000000..267c3ab140 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool/0008-libtool-Avoid-relinking-when-cross-compiling-its-poi.patch @@ -0,0 +1,126 @@ +From 78eac8c99451681f4c403b3ea727ee61651a3c1a Mon Sep 17 00:00:00 2001 +From: Richard Purdie +Date: Wed, 16 Nov 2011 16:58:34 +0000 +Subject: [PATCH] libtool: Avoid relinking when cross compiling, its pointless + +There is no point in having "executable" binaries in the .libs +directory linked with different rpaths to the target which +could concivably be run on the build system when cross compiling. + +This patch removes the extra rpaths ($compile_rpath) so that the +output from the "link" stage can be used on the target. We can then +avoid having to "relink" during the install stage. + +This saves some build time (do_install is over 2 minutes faster for +pulseaudio). + +This patch also removes an annoying "seems to be moved" warning +which is totally bogus in the sysroot case. + +Upstream-Status: Inappropriate [upstream are unlikely to take a patch like this] + +RP 2011/11/16 + +Updated by: Robert Yang +--- + build-aux/ltmain.in | 56 ++++++++++++++++++++++----------------------- + 1 file changed, 28 insertions(+), 28 deletions(-) + +diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in +index fa157775..816ea5a0 100644 +--- a/build-aux/ltmain.in ++++ b/build-aux/ltmain.in +@@ -2513,7 +2513,7 @@ func_mode_install () + dir=$func_dirname_result + func_append dir "$objdir" + +- 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 +@@ -2552,7 +2552,7 @@ func_mode_install () + shift + + srcname=$realname +- test -n "$relink_command" && srcname=${realname}T ++ test "$fast_install" = no && test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ +@@ -6411,18 +6411,18 @@ func_mode_link () + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. +- case " $sys_lib_dlsearch_path " in +- *" $absdir "*) ;; +- *) +- case "$compile_rpath$compile_rpath_tail " in +- *" $absdir "*) ;; +- *) case $absdir in +- "$progdir/"*) func_append compile_rpath " $absdir" ;; +- *) func_append compile_rpath_tail " $absdir" ;; +- esac +- esac +- ;; +- esac ++ #case " $sys_lib_dlsearch_path " in ++ #*" $absdir "*) ;; ++ #*) ++ # case "$compile_rpath$compile_rpath_tail " in ++ # *" $absdir "*) ;; ++ # *) case $absdir in ++ # "$progdir/"*) func_append compile_rpath " $absdir" ;; ++ # *) func_append compile_rpath_tail " $absdir" ;; ++ # esac ++ # esac ++ # ;; ++ #esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) +@@ -6488,18 +6488,18 @@ func_mode_link () + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. +- case " $sys_lib_dlsearch_path " in +- *" $absdir "*) ;; +- *) +- case "$compile_rpath$compile_rpath_tail " in +- *" $absdir "*) ;; +- *) case $absdir in +- "$progdir/"*) func_append compile_rpath " $absdir" ;; +- *) func_append compile_rpath_tail " $absdir" ;; +- esac +- esac +- ;; +- esac ++ #case " $sys_lib_dlsearch_path " in ++ #*" $absdir "*) ;; ++ #*) ++ # case "$compile_rpath$compile_rpath_tail " in ++ # *" $absdir "*) ;; ++ # *) case $absdir in ++ # "$progdir/"*) func_append compile_rpath " $absdir" ;; ++ # *) func_append compile_rpath_tail " $absdir" ;; ++ # esac ++ # esac ++ # ;; ++ #esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) +@@ -6843,8 +6843,8 @@ func_mode_link () + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "'$deplib' is not a valid libtool archive" +- test "$absdir" != "$libdir" && \ +- func_warning "'$deplib' seems to be moved" ++ #test "$absdir" != "$libdir" && \ ++ # func_warning "'$deplib' seems to be moved" + + path=-L$absdir + fi +-- +2.39.5 + 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 deleted file mode 100644 index c103ebb7bf..0000000000 --- a/meta/recipes-devtools/libtool/libtool/0008-libtool-Check-for-static-libs-for-internal-compiler-.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Khem Raj -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] - -Index: libtool-2.5.0/m4/libtool.m4 -=================================================================== ---- libtool-2.5.0.orig/m4/libtool.m4 -+++ libtool-2.5.0/m4/libtool.m4 -@@ -7553,7 +7553,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,l}" and the path. - # Remove the space. - if test x-L = x"$p" || diff --git a/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch b/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch deleted file mode 100644 index 0013d16544..0000000000 --- a/meta/recipes-devtools/libtool/libtool/dont-depend-on-help2man.patch +++ /dev/null @@ -1,31 +0,0 @@ -Upstream-Status: Inappropriate - -Signed-off-by: Marko Lindqvist -Updated by: Robert Yang - -diff --git a/Makefile.am b/Makefile.am -index 7bd7f72..c29860e 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -411,21 +411,6 @@ $(notes_txt): $(notes_texi) - $(AM_V_GEN)$(MAKEINFO) -P '$(srcdir)/doc' --no-headers \ - $(MAKEINFOFLAGS) -o '$@' '$(notes_texi)' - --dist_man1_MANS = $(libtool_1) $(libtoolize_1) --MAINTAINERCLEANFILES += $(dist_man1_MANS) --update_mans = \ -- PATH=".$(PATH_SEPARATOR)$$PATH"; export PATH; \ -- $(HELP2MAN) --output='$@' -- --# It's wrong to make distributed files (e.g. $(libtool_1)) rely on --# files created in the build tree, so instead we regenerate the --# manual pages if the sources for the build-tree files we want to --# run have changed. --$(libtool_1): $(ltmain_sh) -- $(AM_V_GEN)$(update_mans) --help-option=--help-all libtool --$(libtoolize_1): $(libtoolize_in) -- $(AM_V_GEN)$(update_mans) libtoolize -- - - ## ------------- ## - ## Installation. ## diff --git a/meta/recipes-devtools/libtool/libtool/fixinstall.patch b/meta/recipes-devtools/libtool/libtool/fixinstall.patch deleted file mode 100644 index 94601b1beb..0000000000 --- a/meta/recipes-devtools/libtool/libtool/fixinstall.patch +++ /dev/null @@ -1,111 +0,0 @@ -There is no point in having "executable" binaries in the .libs -directory linked with different rpaths to the target which -could concivably be run on the build system when cross compiling. - -This patch removes the extra rpaths ($compile_rpath) so that the -output from the "link" stage can be used on the target. We can then -avoid having to "relink" during the install stage. - -This saves some build time (do_install is over 2 minutes faster for -pulseaudio). - -This patch also removes an annoying "seems to be moved" warning -which is totally bogus in the sysroot case. - -Upstream-Status: Inappropriate [upstream are unlikely to take a patch like this] - -RP 2011/11/16 - -Updated by: Robert Yang - -Index: libtool-2.5.2/build-aux/ltmain.in -=================================================================== ---- libtool-2.5.2.orig/build-aux/ltmain.in -+++ libtool-2.5.2/build-aux/ltmain.in -@@ -2381,7 +2381,7 @@ func_mode_install () - dir=$func_dirname_result - func_append dir "$objdir" - -- 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 -@@ -2419,7 +2419,7 @@ func_mode_install () - shift - - srcname=$realname -- test -n "$relink_command" && srcname=${realname}T -+ test "$fast_install" = no && test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ -@@ -6276,17 +6276,17 @@ func_mode_link () - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. -- case " $sys_lib_dlsearch_path " in -- *" $absdir "*) ;; -- *) -- case "$compile_rpath " in -- *" $absdir "*) ;; -- *) case $absdir in -- "$progdir/"*) func_append compile_rpath " $absdir" ;; -- esac -- esac -- ;; -- esac -+ #case " $sys_lib_dlsearch_path " in -+ #*" $absdir "*) ;; -+ #*) -+ # case "$compile_rpath " in -+ # *" $absdir "*) ;; -+ # *) case $absdir in -+ # "$progdir/"*) func_append compile_rpath " $absdir" ;; -+ # esac -+ # esac -+ # ;; -+ #esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) -@@ -6352,17 +6352,17 @@ func_mode_link () - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. -- case " $sys_lib_dlsearch_path " in -- *" $absdir "*) ;; -- *) -- case "$compile_rpath " in -- *" $absdir "*) ;; -- *) case $absdir in -- "$progdir/"*) func_append compile_rpath " $absdir" ;; -- esac -- esac -- ;; -- esac -+ #case " $sys_lib_dlsearch_path " in -+ #*" $absdir "*) ;; -+ #*) -+ # case "$compile_rpath " in -+ # *" $absdir "*) ;; -+ # *) case $absdir in -+ # "$progdir/"*) func_append compile_rpath " $absdir" ;; -+ # esac -+ # esac -+ # ;; -+ #esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) -@@ -6705,8 +6705,8 @@ func_mode_link () - eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "'$deplib' is not a valid libtool archive" -- test "$absdir" != "$libdir" && \ -- func_warning "'$deplib' seems to be moved" -+ #test "$absdir" != "$libdir" && \ -+ # func_warning "'$deplib' seems to be moved" - - path=-L$absdir - fi diff --git a/meta/recipes-devtools/libtool/libtool/multilib.patch b/meta/recipes-devtools/libtool/libtool/multilib.patch deleted file mode 100644 index 018f066652..0000000000 --- a/meta/recipes-devtools/libtool/libtool/multilib.patch +++ /dev/null @@ -1,23 +0,0 @@ -Without this patch /usr/bin/libtoolize is different for each multilib -since their host-triplets are different, despite there being no difference in -the functionality of libtoolize itself. - -Ugly, but just patch this out. This fixes issues where libtool and -libXX-libtool couldn't be installed into the same system. - -Upstream-Status: Inappropriate -RP 2018/7/30 - -Index: libtool-2.4.6/libtoolize.in -=================================================================== ---- libtool-2.4.6.orig/libtoolize.in -+++ libtool-2.4.6/libtoolize.in -@@ -113,7 +113,7 @@ You must 'cd' to the top directory of yo - When reporting a bug, please describe a test case to reproduce it and - include the following information: - -- host-triplet: @host_triplet@ -+ host-triplet - version: $progname (GNU @PACKAGE@) @VERSION@ - automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` - autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` diff --git a/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch b/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch deleted file mode 100644 index fcbce7286b..0000000000 --- a/meta/recipes-devtools/libtool/libtool/nohardcodepaths.patch +++ /dev/null @@ -1,29 +0,0 @@ -If for example you build on a machine with /bin/grep, then restore that sstate -onto a machine with /usr/bin/grep, things will fail. Simply don't bother -hardcoding paths. - -RP 2015/2/3 - -Upstream-Status: Inappropriate - -Index: libtool-2.4.5/libtoolize.in -=================================================================== ---- libtool-2.4.5.orig/libtoolize.in -+++ libtool-2.4.5/libtoolize.in -@@ -40,11 +40,11 @@ - - : ${AUTOCONF="autoconf"} - : ${AUTOMAKE="automake"} --: ${EGREP="@EGREP@"} --: ${FGREP="@FGREP@"} --: ${GREP="@GREP@"} --: ${LN_S="@LN_S@"} --: ${SED="@SED@"} -+: ${EGREP="egrep"} -+: ${FGREP="fgrep"} -+: ${GREP="grep"} -+: ${LN_S="ln -s"} -+: ${SED="sed"} - - - ## -------------------------- ## diff --git a/meta/recipes-devtools/libtool/libtool_2.5.2.bb b/meta/recipes-devtools/libtool/libtool_2.5.2.bb deleted file mode 100644 index c1e315aece..0000000000 --- a/meta/recipes-devtools/libtool/libtool_2.5.2.bb +++ /dev/null @@ -1,21 +0,0 @@ -require libtool-${PV}.inc -require remove-buildpaths.inc - -SRC_URI += "file://multilib.patch" - -RDEPENDS:${PN} += "bash" - -# -# We want the results of libtool-cross preserved - don't stage anything ourselves. -# -SYSROOT_DIRS_IGNORE += " \ - ${bindir} \ - ${datadir}/aclocal \ - ${datadir}/libtool/build-aux \ -" - -ACLOCALEXTRAPATH:class-target = "" - -inherit multilib_script - -MULTILIB_SCRIPTS = "${PN}:${bindir}/libtool" diff --git a/meta/recipes-devtools/libtool/libtool_2.5.4.bb b/meta/recipes-devtools/libtool/libtool_2.5.4.bb new file mode 100644 index 0000000000..835f2da994 --- /dev/null +++ b/meta/recipes-devtools/libtool/libtool_2.5.4.bb @@ -0,0 +1,19 @@ +require libtool-${PV}.inc +require remove-buildpaths.inc + +RDEPENDS:${PN} += "bash" + +# +# We want the results of libtool-cross preserved - don't stage anything ourselves. +# +SYSROOT_DIRS_IGNORE += " \ + ${bindir} \ + ${datadir}/aclocal \ + ${datadir}/libtool/build-aux \ +" + +ACLOCALEXTRAPATH:class-target = "" + +inherit multilib_script + +MULTILIB_SCRIPTS = "${PN}:${bindir}/libtool" diff --git a/meta/recipes-devtools/libtool/nativesdk-libtool_2.5.2.bb b/meta/recipes-devtools/libtool/nativesdk-libtool_2.5.2.bb deleted file mode 100644 index 2589bd617e..0000000000 --- a/meta/recipes-devtools/libtool/nativesdk-libtool_2.5.2.bb +++ /dev/null @@ -1,24 +0,0 @@ -require libtool-${PV}.inc -require remove-buildpaths.inc - -FILESEXTRAPATHS =. "${FILE_DIRNAME}/libtool:" - -SRC_URI += "file://fixinstall.patch" - -inherit nativesdk - -S = "${WORKDIR}/libtool-${PV}" -FILES:${PN} += "${datadir}/libtool/*" - -do_install () { - autotools_do_install - install -d ${D}${bindir}/ - install -m 0755 libtool ${D}${bindir}/ -} - -SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess" - -libtoolnativesdk_sysroot_preprocess () { - install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ - install -m 755 ${D}${bindir}/libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/libtool -} diff --git a/meta/recipes-devtools/libtool/nativesdk-libtool_2.5.4.bb b/meta/recipes-devtools/libtool/nativesdk-libtool_2.5.4.bb new file mode 100644 index 0000000000..2e39a1e1d7 --- /dev/null +++ b/meta/recipes-devtools/libtool/nativesdk-libtool_2.5.4.bb @@ -0,0 +1,24 @@ +require libtool-${PV}.inc +require remove-buildpaths.inc + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/libtool:" + +SRC_URI += "file://0008-libtool-Avoid-relinking-when-cross-compiling-its-poi.patch" + +inherit nativesdk + +S = "${WORKDIR}/libtool-${PV}" +FILES:${PN} += "${datadir}/libtool/*" + +do_install () { + autotools_do_install + install -d ${D}${bindir}/ + install -m 0755 libtool ${D}${bindir}/ +} + +SYSROOT_PREPROCESS_FUNCS += "libtoolnativesdk_sysroot_preprocess" + +libtoolnativesdk_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ + install -m 755 ${D}${bindir}/libtool ${SYSROOT_DESTDIR}${bindir_crossscripts}/libtool +} -- cgit v1.2.3-54-g00ecf