anjuta (2:3.4.3-1) 99_ltmain_as-needed.patch

Summary

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

    
download this patch

Patch contents

Index: anjuta-3.0.3.0/ltmain.sh
===================================================================
--- anjuta-3.0.3.0.orig/ltmain.sh	2011-05-23 21:12:59.000000000 +0200
+++ anjuta-3.0.3.0/ltmain.sh	2011-06-24 02:03:09.583284392 +0200
@@ -5787,6 +5787,11 @@
 	arg=$func_stripname_result
 	;;
 
+      -Wl,--as-needed)
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
       -Wl,*)
 	func_stripname '-Wl,' '' "$arg"
 	args=$func_stripname_result
@@ -6147,6 +6152,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"