Apply ltmain-asneeded.patch 84/65184/2 accepted/tizen_3.0.m2_base tizen_3.0 tizen_3.0.m2_base accepted/tizen/3.0.m2/base/20170104.081907 accepted/tizen/3.0/base/20161028.103034 accepted/tizen/base/20160415.195605 submit/tizen_3.0.m2_base/20170104.073748 submit/tizen_3.0_base/20161028.062323 submit/tizen_base/20160414.032042
authorDongkyun, Son <dongkyun.s@samsung.com>
Thu, 7 Apr 2016 18:23:23 +0000 (03:23 +0900)
committerDongkyun, Son <dongkyun.s@samsung.com>
Fri, 8 Apr 2016 10:46:53 +0000 (19:46 +0900)
Patch libtool so that --as-needed works with shared libraries

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347650

Change-Id: I2558313ca940d1d8f5a8cfb57117a7ab8cfc9afe
Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
libltdl/config/ltmain.sh

index 63ae69d..0fe7413 100644 (file)
@@ -5800,6 +5800,11 @@ func_mode_link ()
        arg=$func_stripname_result
        ;;
 
+      -Wl,--as-needed)
+       deplibs="$deplibs $arg"
+       continue
+       ;;
+
       -Wl,*)
        func_stripname '-Wl,' '' "$arg"
        args=$func_stripname_result
@@ -6160,6 +6165,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|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
          if test "$linkmode,$pass" = "prog,link"; then