summaryrefslogtreecommitdiffstats
path: root/http/kazehakase/99_ltmain_as-needed.dpatch
blob: f952e64555c4a135d315f7943b0ba02001b26772 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /bin/sh /usr/share/dpatch/dpatch-run
##
## DP: Make --as-needed to work; standard patch from Debian GNOME
## DP: packages.

@DPATCH@
diff -urNad kazehakase-0.4.8~/ltmain.sh kazehakase-0.4.8/ltmain.sh
--- kazehakase-0.4.8~/ltmain.sh	2007-07-12 00:11:42.000000000 +0300
+++ kazehakase-0.4.8/ltmain.sh	2008-04-04 00:09:07.000000000 +0300
@@ -1794,6 +1794,11 @@
 	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
 	;;
 
+      -Wl,--as-needed)
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
       -Wl,*)
 	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
 	arg=
@@ -2137,6 +2142,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"