From: Alessandro Ghedini Date: Sun, 1 Oct 2023 14:01:42 +0000 (+0100) Subject: Work around libtool --as-needed reordering bug X-Git-Tag: archive/raspbian/8.3.0-2+rpi1^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5730c273daa8f9f42437f3c7ae28269981930ae7;p=curl.git Work around libtool --as-needed reordering bug Origin: vendor Bug-Debian: http://bugs.debian.org/347650 Forwarded: not-needed Reviewed-by: Alessandro Ghedini Last-Update: 2016-08-03 Gbp-Pq: Name 04_workaround_as_needed_bug.patch --- diff --git a/ltmain.sh b/ltmain.sh index 1dea62ab..abf67247 100755 --- a/ltmain.sh +++ b/ltmain.sh @@ -7488,6 +7488,11 @@ func_mode_link () arg=$func_stripname_result ;; + -Wl,--as-needed|-Wl,--no-as-needed) + deplibs="$arg $deplibs" + continue + ;; + -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result @@ -7887,6 +7892,15 @@ func_mode_link () lib= found=false case $deplib in + -Wl,--as-needed|-Wl,--no-as-needed) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + fi + continue + ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then