chiark / gitweb /
curl (7.56.1-1) unstable; urgency=medium
[curl.git] / debian / patches / 04_workaround_as_needed_bug.patch
1 Description: Work around libtool --as-needed reordering bug
2 Origin: vendor
3 Bug-Debian: http://bugs.debian.org/347650
4 Forwarded: not-needed
5 Author: Alessandro Ghedini <ghedo@debian.org>
6 Reviewed-by: Alessandro Ghedini <ghedo@debian.org>
7 Last-Update: 2016-08-03
8
9 --- a/ltmain.sh
10 +++ b/ltmain.sh
11 @@ -7220,6 +7220,11 @@
12         arg=$func_stripname_result
13         ;;
14  
15 +      -Wl,--as-needed|-Wl,--no-as-needed)
16 +       deplibs="$arg $deplibs"
17 +       continue
18 +       ;;
19 +
20        -Wl,*)
21         func_stripname '-Wl,' '' "$arg"
22         args=$func_stripname_result
23 @@ -7610,6 +7615,15 @@
24         lib=
25         found=false
26         case $deplib in
27 +       -Wl,--as-needed|-Wl,--no-as-needed)
28 +         if test "$linkmode,$pass" = "prog,link"; then
29 +           compile_deplibs="$deplib $compile_deplibs"
30 +           finalize_deplibs="$deplib $finalize_deplibs"
31 +         else
32 +           deplibs="$deplib $deplibs"
33 +         fi
34 +         continue
35 +         ;;
36         -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
37          |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
38           if test prog,link = "$linkmode,$pass"; then