summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2011-10-22 18:29:05 +1000
committerDan McGee <dan@archlinux.org>2011-10-25 10:37:30 -0500
commit571f2f78141a5c13aaf90cfbfe99c04af8158e4e (patch)
tree27771f647f1bfccc4f1e384b22d6a2ee65aee8ad
parent0d9e7da309f27c099814232d0f1be1b2ae884b2a (diff)
downloadpacman-571f2f78141a5c13aaf90cfbfe99c04af8158e4e.tar.xz
Fix libtool detection of --as-needed flag
The fix for -Wl,--as-needed in commit b0f9477f assumes that --as-needed/--no-as-needed is the only option given in a -Wl line. However, it is perfectly valid to specify multiple flags comma separated after a single -Wl (e.g. the default LDFLAGS in Arch Linux makepkg.conf). Adjust the fix so it detect --as-needed in a more general context > readelf -d lib/libalpm/.libs/libalpm.so.?.?.? | grep NEEDED | wc -l Before: 13 After: 5 Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--ltmain.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/ltmain.sh b/ltmain.sh
index fafd01b2..5f505e27 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -5800,9 +5800,12 @@ func_mode_link ()
arg=$func_stripname_result
;;
- -Wl,--as-needed|-Wl,--no-as-needed)
- deplibs="$deplibs $arg"
- continue
+ -Wl,*--as-needed*)
+ deplibs="$deplibs $wl--as-needed"
+ ;;
+
+ -Wl,*--no-as-needed*)
+ deplibs="$deplibs $wl--no-as-needed"
;;
-Wl,*)