From 709a559c717461574c09e3764a5e29ce01352bc0 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Tue, 24 Oct 2017 11:05:48 +0100 Subject: [PATCH] _workaround_as_needed_bug Gbp-Pq: Name 04_workaround_as_needed_bug.patch --- ltmain.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ltmain.sh b/ltmain.sh index a736cf9..60d40a1 100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -7220,6 +7220,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 @@ -7610,6 +7615,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 -- 2.30.2