Hello, This patch is a follow-up from the proposal posted on the mailing list, titled opt_duplicate_compiler_generated_deps [1].
Fred. [1] https://lists.gnu.org/archive/html/libtool/2022-02/msg00001.html -- 8< -- On Linux, postdeps may be defined as "-lstdc++ -lm -lgcc_s -lc -lgcc_s", which is later stripped to "-lstdc++ -lm -lc -lgcc_s" leading to undefined symbol references. Since this behavior has been observed on quite a lot of systems now, it appears that de-duplicating compiler generated deps generates more harm than benefits. Therefore, instead of adding one more exception, unconditionally keep compiler generated deps by default for all hosts. --- build-aux/ltmain.in | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in index a5f21a1d..8d1b1687 100644 --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in @@ -518,17 +518,9 @@ libtool_validate_options () # 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 deps duplicates doesn't harm, and is necessary + # in a majority of systems. + opt_duplicate_compiler_generated_deps=: $opt_help || { # Sanity checks first: -- 2.34.1