libgweather (2.30.3-1) 99_ltmain_as-needed.patch

Summary

 ltmain.sh |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

    
download this patch

Patch contents

Index: b/ltmain.sh
===================================================================
--- a/ltmain.sh	2010-06-22 05:02:29.000000000 +0200
+++ b/ltmain.sh	2010-07-27 18:32:30.105880012 +0200
@@ -4716,6 +4716,11 @@
 	arg=$func_stripname_result
 	;;
 
+      -Wl,--as-needed)
+	deplibs="$deplibs $arg"
+	continue
+	;;
+      
       -Wl,*)
 	func_stripname '-Wl,' '' "$arg"
 	args=$func_stripname_result
@@ -5067,6 +5072,15 @@
 	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"