summaryrefslogtreecommitdiff
path: root/ltmain.sh
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-03-19 21:28:34 +0100
committerDan McGee <dan@archlinux.org>2011-03-20 11:22:41 -0500
commitb0f9477f01a5639a2c9213f19a6ee8acefd00f1e (patch)
tree65b361ac22712f4b533a51a88dfd6071ad7ad83c /ltmain.sh
parent58df372be6758cfe00069ac7279cd92e3b61edef (diff)
downloadpacman-b0f9477f01a5639a2c9213f19a6ee8acefd00f1e.tar.xz
Fix libtool and LDFLAGS reordering issues
This is a Debian patch (from #347650) that makes libtool play nicely with "-Wl,--as-needed". Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'ltmain.sh')
-rwxr-xr-xltmain.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/ltmain.sh b/ltmain.sh
index 6c02b188..4e98c79a 100755
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -5790,6 +5790,11 @@ func_mode_link ()
arg=$func_stripname_result
;;
+ -Wl,--as-needed|-Wl,--no-as-needed)
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
-Wl,*)
func_stripname '-Wl,' '' "$arg"
args=$func_stripname_result
@@ -6150,6 +6155,15 @@ func_mode_link ()
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)
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"