From 2103f3557ecaa87d60ddb9c8d2f490c8ead9f3a0 Mon Sep 17 00:00:00 2001 From: Frederic Berat Date: Feb 22 2022 16:20:07 +0000 Subject: ltmain: Keep compiler deps as-is Keep the library dependency list generated by the compiler as-is. Some libraries are given multiple times to satisfy proper symbol resolution, don't break it. Refer to rhbz#2043517 [1] for more details. Patch proposal sent upstream [2]. [1] https://bugzilla.redhat.com/show_bug.cgi?id=2043517 [2] https://lists.gnu.org/archive/html/libtool-patches/2022-02/msg00000.html Reviewed-by: Carlos O'Donell --- diff --git a/libtool-2.4.6-keep-compiler-deps.patch b/libtool-2.4.6-keep-compiler-deps.patch new file mode 100644 index 0000000..ab81bbb --- /dev/null +++ b/libtool-2.4.6-keep-compiler-deps.patch @@ -0,0 +1,58 @@ +diff -r -U5 libtool-2.4.6/build-aux/ltmain.in libtool-2.4.6.new/build-aux/ltmain.in +--- libtool-2.4.6/build-aux/ltmain.in 2022-02-22 09:21:35.317958251 +0100 ++++ libtool-2.4.6.new/build-aux/ltmain.in 2022-02-22 09:16:10.117571787 +0100 +@@ -501,21 +501,14 @@ + fi + + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + +- case $host in +- # 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*) +- # don't eliminate duplications in $postdeps and $predeps +- opt_duplicate_compiler_generated_deps=: +- ;; +- *) +- opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps +- ;; +- esac ++ # Keeping compiler generated duplicates in $postdeps and $predeps is not ++ # harmful, and is necessary in a majority of systems that use it to satisfy ++ # symbol dependencies. ++ opt_duplicate_compiler_generated_deps=: + + $opt_help || { + # Sanity checks first: + func_check_version_match + +diff -r -U5 libtool-2.4.6/build-aux/ltmain.sh libtool-2.4.6.new/build-aux/ltmain.sh +--- libtool-2.4.6/build-aux/ltmain.sh 2015-02-15 17:15:12.000000000 +0100 ++++ libtool-2.4.6.new/build-aux/ltmain.sh 2022-02-22 09:16:44.783613061 +0100 +@@ -2413,21 +2413,14 @@ + fi + + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + +- case $host in +- # 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*) +- # don't eliminate duplications in $postdeps and $predeps +- opt_duplicate_compiler_generated_deps=: +- ;; +- *) +- opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps +- ;; +- esac ++ # Keeping compiler generated duplicates in $postdeps and $predeps is not ++ # harmful, and is necessary in a majority of systems that use it to satisfy ++ # symbol dependencies. ++ opt_duplicate_compiler_generated_deps=: + + $opt_help || { + # Sanity checks first: + func_check_version_match + diff --git a/libtool.spec b/libtool.spec index 386c595..4c75e29 100644 --- a/libtool.spec +++ b/libtool.spec @@ -8,7 +8,7 @@ Summary: The GNU Portable Library Tool Name: libtool Version: 2.4.6 -Release: 49%{?dist} +Release: 50%{?dist} License: GPLv2+ and LGPLv2+ and GFDL URL: http://www.gnu.org/software/libtool/ @@ -50,6 +50,10 @@ Patch7: libtool-2.4.6-use-ld.patch # https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/503448 Patch8: libtool-2.4.6-disable_non-pic_arm.patch +# rhbz#2047389, patch sent upstream +# https://lists.gnu.org/archive/html/libtool-patches/2022-02/msg00000.html +Patch9: libtool-2.4.6-keep-compiler-deps.patch + %if ! 0%{?_module_build} Patch100: libtool-nodocs.patch %endif @@ -176,6 +180,9 @@ rm -f %{buildroot}%{_libdir}/libltdl.{a,la} %changelog +* Thu Feb 17 2022 Frederic Berat - 2.4.6-50 +- Keep compiler generated list of library dependencies. + * Sun Feb 13 2022 Jeff Law - 2.4.6-49 - Re-enable LTO (completing change from Nov 29, 2021)