pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/wrapper Preserve the -Wl,-Bstatic / -Wl,-Bdynamic a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a578019c3a95
branches:  trunk
changeset: 535130:a578019c3a95
user:      he <he%pkgsrc.org@localhost>
date:      Thu Nov 08 17:38:17 2007 +0000

description:
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:

 mk/wrapper/buildcmd |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r e6f46510890a -r a578019c3a95 mk/wrapper/buildcmd
--- a/mk/wrapper/buildcmd       Thu Nov 08 16:16:11 2007 +0000
+++ b/mk/wrapper/buildcmd       Thu Nov 08 17:38:17 2007 +0000
@@ -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 @@
                ;;
        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)



Home | Main Index | Thread Index | Old Index