File: 04_workaround_as_needed_bug.patch

package info (click to toggle)
curl 7.88.1-10%2Bdeb12u14
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 38,360 kB
  • sloc: ansic: 173,351; perl: 15,803; sh: 5,503; makefile: 1,421; pascal: 744; python: 717; cpp: 167
file content (40 lines) | stat: -rw-r--r-- 1,153 bytes parent folder | download | duplicates (2)
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
38
39
40
Description: Work around libtool --as-needed reordering bug
Origin: vendor
Bug-Debian: http://bugs.debian.org/347650
Forwarded: not-needed
Author: Alessandro Ghedini <ghedo@debian.org>
Reviewed-by: Alessandro Ghedini <ghedo@debian.org>
Last-Update: 2016-08-03

Index: curl/ltmain.sh
===================================================================
--- curl.orig/ltmain.sh
+++ curl/ltmain.sh
@@ -7500,6 +7500,11 @@ func_mode_link ()
 	arg=$func_stripname_result
 	;;
 
+      -Wl,--as-needed|-Wl,--no-as-needed)
+	deplibs="$arg $deplibs"
+	continue
+	;;
+
       -Wl,*)
 	func_stripname '-Wl,' '' "$arg"
 	args=$func_stripname_result
@@ -7899,6 +7904,15 @@ func_mode_link ()
 	lib=
 	found=false
 	case $deplib in
+	-Wl,--as-needed|-Wl,--no-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 prog,link = "$linkmode,$pass"; then