Package: gucharmap / 1:3.4.1.1-2.1

99_ltmain_as-needed.patch Patch series | download
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
Link with --as-needed, -z,defs and -O1

Index: gucharmap-3.2.2/ltmain.sh
===================================================================
--- gucharmap-3.2.2.orig/ltmain.sh	2011-11-14 18:09:24.000000000 +0100
+++ gucharmap-3.2.2/ltmain.sh	2011-11-17 03:37:26.730448460 +0100
@@ -5786,6 +5786,11 @@
 	func_stripname ' ' '' "$arg"
 	arg=$func_stripname_result
 	;;
+        
+       -Wl,--as-needed)
+        deplibs="$deplibs $arg"
+        continue
+        ;;
 
       -Wl,*)
 	func_stripname '-Wl,' '' "$arg"
@@ -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"