summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorhe <he>2007-11-08 17:38:17 +0000
committerhe <he>2007-11-08 17:38:17 +0000
commit453bcaa71453cd8a1f63c28f865297be50c1013b (patch)
treec6496f4b962a7b16b6047d102628f50823b9d482 /mk
parent93f23aef28afcd1808fadc0a5f7e4b951099267b (diff)
downloadpkgsrc-453bcaa71453cd8a1f63c28f865297be50c1013b.tar.gz
Preserve the -Wl,-Bstatic / -Wl,-Bdynamic arguments, but also
duplicate them into the list of libraries. Someone may want to mix static and dynamic linking. Fixes PR#37228, approved by jlam. jlam says that a better long-term fix would be to ensure that all the -L specifications come before the -l specifications, instead of moving all the -l specifications to the end of the command line.
Diffstat (limited to 'mk')
-rw-r--r--mk/wrapper/buildcmd12
1 files changed, 11 insertions, 1 deletions
diff --git a/mk/wrapper/buildcmd b/mk/wrapper/buildcmd
index 42fb3575857..1113513c7b7 100644
--- a/mk/wrapper/buildcmd
+++ b/mk/wrapper/buildcmd
@@ -1,4 +1,4 @@
-# $NetBSD: buildcmd,v 1.1 2004/09/21 15:01:41 jlam Exp $
+# $NetBSD: buildcmd,v 1.2 2007/11/08 17:38:17 he Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -55,6 +55,16 @@ case $arg in
;;
esac
;;
+######################################################################
+# Preserve the -Wl,-Bstatic / -Wl,-Bdynamic arguments, but also
+# duplicate them into the list of libraries. Someone may want to mix
+# static and dynamic linking.
+######################################################################
+-Wl,-Bdynamic|-Wl,-Bstatic)
+ shquote "$arg"; arg="$shquoted"
+ cmd="$cmd $arg"
+ libs="$libs $arg"
+ ;;
-l*)
case $libs in
*" "$arg)