Commit 2e32d51a authored by Allan McRae's avatar Allan McRae
Browse files

Remove unneeded ltmain patch

Many moons ago, libtool was bad - I mean worse than today!  It gobbled all
--as-needed and we ended up with an overlinked libalpm.  This was annoying,
particularly when dealing with soname bumps in libraries pacman/libalpm had
no business linking to. Luckily we had a fix, stolen from GNOME I believe.
And with that fix, we lived in harmony with libtool for many years.  Until one
day, unbeknownst to us, libtool was "fixed".  We kept applying our patch,
because it still applied, but it did worse than nothing.  It gobbled up our
other LDFLAGS, and our libalpm started missing out on RELRO and BIND_NOW.
This made the Arch Security Team unhappy. We will make them happy again by
stopping the patch.

Signed-off-by: Allan McRae's avatarAllan McRae <>
parent 75bf8e88
#!/bin/sh -x
autoreconf -i
patch -d build-aux -Np0 -i ltmain-asneeded.patch
exit 0
--- 2013-06-26 14:31:53.472627840 +1000
+++ 2013-06-26 14:30:56.137038936 +1000
@@ -5800,6 +5800,14 @@
+ -Wl,*--as-needed*)
+ deplibs="$deplibs $wl--as-needed"
+ ;;
+ -Wl,*--no-as-needed*)
+ deplibs="$deplibs $wl--no-as-needed"
+ ;;
func_stripname '-Wl,' '' "$arg"
@@ -6160,6 +6168,15 @@
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 \
if test "$linkmode,$pass" = "prog,link"; then
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment