summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorsbd <sbd@pkgsrc.org>2012-04-13 03:11:13 +0000
committersbd <sbd@pkgsrc.org>2012-04-13 03:11:13 +0000
commit652b8aa753d10dfaa886514cafe18b85d4baee46 (patch)
tree0004d823c927838c4076894bb635728434da738b /mk
parent7f2a92eb677f9a7006c180ff980f1c430164377a (diff)
downloadpkgsrc-652b8aa753d10dfaa886514cafe18b85d4baee46.tar.gz
Treat the '--as-needed' and '--no-as-needed' arguments to ld as if
thay are librarys so that they still surround the given library. WARNING: this may not work if the wrapper reorders librarys.
Diffstat (limited to 'mk')
-rw-r--r--mk/wrapper/buildcmd9
1 files changed, 7 insertions, 2 deletions
diff --git a/mk/wrapper/buildcmd b/mk/wrapper/buildcmd
index 61fce2af41a..f5bed67da2b 100644
--- a/mk/wrapper/buildcmd
+++ b/mk/wrapper/buildcmd
@@ -1,4 +1,4 @@
-# $NetBSD: buildcmd,v 1.4 2008/04/21 14:43:50 joerg Exp $
+# $NetBSD: buildcmd,v 1.5 2012/04/13 03:11:13 sbd Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -65,7 +65,12 @@ case $arg in
cmd="$cmd $arg"
libs="$libs $arg"
;;
--l*)
+######################################################################
+# Treat the '--as-needed' and '--no-as-needed' arguments to ld as if
+# thay are librarys so that they still surround the given library.
+# WARNING: this may not work if the wrapper reorders librarys.
+######################################################################
+-l*|--as-needed|--no-as-needed)
case $libs in
*" "$arg)
;;