pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/wrapper If we have -Wl,--whole-archive -lfoo -lbar ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fe536806386e
branches:  trunk
changeset: 650687:fe536806386e
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sat Apr 25 22:15:38 2015 +0000

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

 mk/wrapper/buildcmd |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 20c0a7601aba -r fe536806386e mk/wrapper/buildcmd
--- a/mk/wrapper/buildcmd       Sat Apr 25 22:09:08 2015 +0000
+++ b/mk/wrapper/buildcmd       Sat Apr 25 22:15:38 2015 +0000
@@ -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 @@
 ######################################################################
 # 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)
                ;;



Home | Main Index | Thread Index | Old Index