aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/99_ltmain_as-needed.patch
blob: 7f328230584c32baaf1be4e06f3e58355eb6fd08 (plain)
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
Index: gst-libav1.0/ltmain.sh
===================================================================
--- gst-libav1.0.orig/ltmain.sh	2012-08-09 11:59:48.322044780 +0200
+++ gst-libav1.0/ltmain.sh	2012-12-18 11:40:28.530169305 +0100
@@ -5800,6 +5800,11 @@
 	arg=$func_stripname_result
 	;;
 
+      -Wl,--as-needed)
+	deplibs="$deplibs $arg"
+	continue
+	;;
+
       -Wl,*)
 	func_stripname '-Wl,' '' "$arg"
 	args=$func_stripname_result
@@ -6163,6 +6168,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|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
 	  if test "$linkmode,$pass" = "prog,link"; then