summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2015-04-25 22:15:38 +0000
committertnn <tnn@pkgsrc.org>2015-04-25 22:15:38 +0000
commitf4ce6ceaec883029a587f22e6b41f39fc2b66152 (patch)
tree6e09cce155134ad2717bb82a3965e1e78e62a0ff /mk
parent5bebcc9e2e3b040078f7aa41ff1cd4fb8ebcb2aa (diff)
downloadpkgsrc-f4ce6ceaec883029a587f22e6b41f39fc2b66152.tar.gz
If we have -Wl,--whole-archive -lfoo -lbar -Wl,--no-whole-archive
surrounding a list of static libraries, we must preserve that order so the effect of --whole-archive is as intended by the package. cwrappers does this correctly but classic wrappers didn't.
Diffstat (limited to 'mk')
-rw-r--r--mk/wrapper/buildcmd5
1 files changed, 3 insertions, 2 deletions
diff --git a/mk/wrapper/buildcmd b/mk/wrapper/buildcmd
index 909b6353ac8..a5823bbe0a7 100644
--- a/mk/wrapper/buildcmd
+++ b/mk/wrapper/buildcmd
@@ -1,4 +1,4 @@
-# $NetBSD: buildcmd,v 1.6 2012/04/13 06:36:08 wiz Exp $
+# $NetBSD: buildcmd,v 1.7 2015/04/25 22:15:38 tnn Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -68,9 +68,10 @@ case $arg in
######################################################################
# Treat the '--as-needed' and '--no-as-needed' arguments to ld as if
# thay are libraries so that they still surround the given library.
+# Same for '-Wl,--whole-archive' and '-Wl,--no-whole-archive'.
# WARNING: this may not work if the wrapper reorders libraries.
######################################################################
--l*|--as-needed|--no-as-needed)
+-l*|--as-needed|--no-as-needed|-Wl,--whole-archive|-Wl,--no-whole-archive)
case $libs in
*" "$arg)
;;