diff options
author | he <he@pkgsrc.org> | 2007-11-08 17:38:17 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2007-11-08 17:38:17 +0000 |
commit | 4c77b0e4fd8b8861d780949557d0eb6e86c1fe8a (patch) | |
tree | c6496f4b962a7b16b6047d102628f50823b9d482 /mk/wrapper | |
parent | 894f7b8ba68bc2c5ab5941c8c0ec351dbb179988 (diff) | |
download | pkgsrc-4c77b0e4fd8b8861d780949557d0eb6e86c1fe8a.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/wrapper')
-rw-r--r-- | mk/wrapper/buildcmd | 12 |
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) |