From b13efcda83c4e2aa4d1eb0534227b1789cacb1b0 Mon Sep 17 00:00:00 2001 From: Debian GNOME Maintainers Date: Sat, 14 May 2022 03:38:37 +0800 Subject: [PATCH] _ltmain_as-needed =================================================================== Gbp-Pq: Name 99_ltmain_as-needed.patch --- ltmain.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ltmain.sh b/ltmain.sh index 6939dcc..ef9931e 100755 --- a/ltmain.sh +++ b/ltmain.sh @@ -4716,6 +4716,11 @@ func_mode_link () arg=$func_stripname_result ;; + -Wl,--as-needed) + deplibs="$deplibs $arg" + continue + ;; + -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result @@ -5067,6 +5072,15 @@ func_mode_link () lib= found=no case $deplib in + -Wl,--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) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs"