libgail-gnome (1.20.3-1) 99_ltmain_as-needed.patch

Summary

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

    
download this patch

Patch contents

Index: libgail-gnome-1.20.3/ltmain.sh
===================================================================
--- libgail-gnome-1.20.3.orig/ltmain.sh	2010-09-08 20:10:53.039332228 +0200
+++ libgail-gnome-1.20.3/ltmain.sh	2010-09-08 20:13:03.610834547 +0200
@@ -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
@@ -5070,6 +5075,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"