Sun Apr 26 07:59:58 2015 UTC ()
revert rev. 1.7. Although it should be correct in theory it interacts
with the build of some packages in subtle ways, and needs more testing.


(tnn)
diff -r1.8 -r1.9 pkgsrc/mk/wrapper/buildcmd

cvs diff -r1.8 -r1.9 pkgsrc/mk/wrapper/buildcmd (expand / switch to unified diff)

--- pkgsrc/mk/wrapper/buildcmd 2015/04/25 22:26:41 1.8
+++ pkgsrc/mk/wrapper/buildcmd 2015/04/26 07:59:58 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: buildcmd,v 1.8 2015/04/25 22:26:41 wiz Exp $ 1# $NetBSD: buildcmd,v 1.9 2015/04/26 07:59:58 tnn Exp $
2# 2#
3# Copyright (c) 2004 The NetBSD Foundation, Inc. 3# Copyright (c) 2004 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# This code is derived from software contributed to The NetBSD Foundation 6# This code is derived from software contributed to The NetBSD Foundation
7# by Johnny C. Lam. 7# by Johnny C. Lam.
8# 8#
9# Redistribution and use in source and binary forms, with or without 9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions 10# modification, are permitted provided that the following conditions
11# are met: 11# are met:
12# 1. Redistributions of source code must retain the above copyright 12# 1. Redistributions of source code must retain the above copyright
13# notice, this list of conditions and the following disclaimer. 13# notice, this list of conditions and the following disclaimer.
14# 2. Redistributions in binary form must reproduce the above copyright 14# 2. Redistributions in binary form must reproduce the above copyright
@@ -58,30 +58,29 @@ case $arg in @@ -58,30 +58,29 @@ case $arg in
58###################################################################### 58######################################################################
59# Preserve the -Wl,-Bstatic / -Wl,-Bdynamic arguments, but also 59# Preserve the -Wl,-Bstatic / -Wl,-Bdynamic arguments, but also
60# duplicate them into the list of libraries. Someone may want to mix 60# duplicate them into the list of libraries. Someone may want to mix
61# static and dynamic linking. 61# static and dynamic linking.
62###################################################################### 62######################################################################
63-Wl,-Bdynamic|-Wl,-Bstatic) 63-Wl,-Bdynamic|-Wl,-Bstatic)
64 shquote "$arg"; arg="$shquoted" 64 shquote "$arg"; arg="$shquoted"
65 cmd="$cmd $arg" 65 cmd="$cmd $arg"
66 libs="$libs $arg" 66 libs="$libs $arg"
67 ;; 67 ;;
68###################################################################### 68######################################################################
69# Treat the '--as-needed' and '--no-as-needed' arguments to ld as if 69# Treat the '--as-needed' and '--no-as-needed' arguments to ld as if
70# they are libraries so that they still surround the given library. 70# they are libraries so that they still surround the given library.
71# Same for '-Wl,--whole-archive' and '-Wl,--no-whole-archive'. 
72# WARNING: this may not work if the wrapper reorders libraries. 71# WARNING: this may not work if the wrapper reorders libraries.
73###################################################################### 72######################################################################
74-l*|--as-needed|--no-as-needed|-Wl,--whole-archive|-Wl,--no-whole-archive) 73-l*|--as-needed|--no-as-needed)
75 case $libs in 74 case $libs in
76 *" "$arg) 75 *" "$arg)
77 ;; 76 ;;
78 *) 77 *)
79 shquote "$arg"; arg="$shquoted" 78 shquote "$arg"; arg="$shquoted"
80 libs="$libs $arg" 79 libs="$libs $arg"
81 ;; 80 ;;
82 esac 81 esac
83 ;; 82 ;;
84###################################################################### 83######################################################################
85# Append $arg to $cmd to build up the command line to be executed. 84# Append $arg to $cmd to build up the command line to be executed.
86###################################################################### 85######################################################################
87*) 86*)