]> wolfpit.net Git - tool/Arch-pacman/.git/commitdiff
Patch ltmain on autoreconf
authorAllan McRae <allan@archlinux.org>
Wed, 26 Jun 2013 04:37:53 +0000 (14:37 +1000)
committerAllan McRae <allan@archlinux.org>
Mon, 22 Jul 2013 03:27:47 +0000 (13:27 +1000)
We used to carry a patched version of ltmain in our repos to fix libtools
issues with -Wl,-as-needed. Now that ltmain is "generated" by autoreconf,
we manually patch it afterwards.

Signed-off-by: Allan McRae <allan@archlinux.org>
autogen.sh
build-aux/.gitignore
build-aux/ltmain-asneeded.patch [new file with mode: 0644]

index c31f34fbab73b115d03f7a784bb9db01bba34642..d11badcbe35d8ec5d3e22a12e2809b7026246139 100755 (executable)
@@ -1,3 +1,4 @@
 #!/bin/sh -xu
 
-autoreconf -i
\ No newline at end of file
+autoreconf -i
+(cd build-aux && patch -Np0 -i ltmain-asneeded.patch)
index f59ec20aabf5842d237244ece8c81ab184faeac1..3ec659c24966b09e7b8a86eb12a47a3a989df3b5 100644 (file)
@@ -1 +1,2 @@
-*
\ No newline at end of file
+*
+!ltmain-asneeded.patch
diff --git a/build-aux/ltmain-asneeded.patch b/build-aux/ltmain-asneeded.patch
new file mode 100644 (file)
index 0000000..af5ae6b
--- /dev/null
@@ -0,0 +1,33 @@
+--- ltmain.sh.orig     2013-06-26 14:31:53.472627840 +1000
++++ ltmain.sh  2013-06-26 14:30:56.137038936 +1000
+@@ -5800,6 +5800,14 @@
+       arg=$func_stripname_result
+       ;;
++      -Wl,*--as-needed*)
++      deplibs="$deplibs $wl--as-needed"
++      ;;
++
++      -Wl,*--no-as-needed*)
++      deplibs="$deplibs $wl--no-as-needed"
++      ;;
++
+       -Wl,*)
+       func_stripname '-Wl,' '' "$arg"
+       args=$func_stripname_result
+@@ -6160,6 +6168,15 @@
+       lib=
+       found=no
+       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 "$linkmode,$pass" = "prog,link"; then