libgiigic (1.1.2-2) 00_fix_as-needed.patch

Summary

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

    
download this patch

Patch contents

--- a/ltmain.sh.orig	2006-03-29 15:45:36.000000000 +0200
+++ b/ltmain.sh	2006-03-29 16:39:30.000000000 +0200
@@ -3276,6 +3276,11 @@
 	arg=$func_stripname_result
 	;;
 
+      -Wl,--as-needed)
+	deplibs="$deplibs $arg"
+	continue
+	;;
+      
       -Wl,*)
 	func_stripname '-Wl,' '' "$arg"
 	args=$func_stripname_result
@@ -3618,6 +3623,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)
 	  if test "$linkmode,$pass" = "prog,link"; then
 	    compile_deplibs="$deplib $compile_deplibs"