diff options
author | rillig <rillig> | 2006-11-30 11:51:39 +0000 |
---|---|---|
committer | rillig <rillig> | 2006-11-30 11:51:39 +0000 |
commit | b69f6d0be46c8227aeca801b54a8f097cdaa05f0 (patch) | |
tree | acf7b0af51b34640fbd582e606f8cfc3f1eb2aa5 /mk/wrapper | |
parent | c7ac9bd74712ab27806fefb7d6df62ccb22fad0f (diff) | |
download | pkgsrc-b69f6d0be46c8227aeca801b54a8f097cdaa05f0.tar.gz |
Converted to use the new transform_* functions from wrapper-subr.sh.
Diffstat (limited to 'mk/wrapper')
-rw-r--r-- | mk/wrapper/transform-aix-cc | 32 | ||||
-rw-r--r-- | mk/wrapper/transform-ccc-cc | 49 |
2 files changed, 42 insertions, 39 deletions
diff --git a/mk/wrapper/transform-aix-cc b/mk/wrapper/transform-aix-cc index 91ed313b1b6..b10bd228305 100644 --- a/mk/wrapper/transform-aix-cc +++ b/mk/wrapper/transform-aix-cc @@ -1,4 +1,4 @@ -# $NetBSD: transform-aix-cc,v 1.3 2006/09/17 18:46:00 rillig Exp $ +# $NetBSD: transform-aix-cc,v 1.4 2006/11/30 11:51:39 rillig Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -34,19 +34,25 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -# prepend -Wl, to linker arguments commonly passed to the compiler. +transform_setname "transform-aix-cc" + case $arg in --H[0-9]*|-T[0-9]*|-b*) - arg=-Wl,$arg - $debug_log $wrapperlog " (transform-aix-cc) to: $arg" - addtocache=yes - ;; + +# Standard options. +-[cEgOo] |\ +-[DILlU]?* |\ +-O[01] ) transform_pass ;; + +# prepend -Wl, to linker arguments commonly passed to the compiler. +-b* |\ +-H[0-9]* |\ +-T[0-9]* ) transform_to "-Wl,$arg" ;; + # AIX ld(1) uses -G to create shared libraries, and we must make sure # the runtime linker is used. --shared) - arg="-Wl,-G -Wl,-brtl" - $debug_log $wrapperlog " (transform-aix-cc) to: $arg" - addtocache=yes - split_arg=yes - ;; +-shared ) transform_to_and_split "-Wl,-G -Wl,-brtl" ;; + +# Unknown options. +-* ) transform_pass_with_warning ;; + esac diff --git a/mk/wrapper/transform-ccc-cc b/mk/wrapper/transform-ccc-cc index cb6a0026173..1d98b8571f5 100644 --- a/mk/wrapper/transform-ccc-cc +++ b/mk/wrapper/transform-ccc-cc @@ -1,32 +1,29 @@ -# $NetBSD: transform-ccc-cc,v 1.3 2006/09/17 18:46:00 rillig Exp $ +# $NetBSD: transform-ccc-cc,v 1.4 2006/11/30 11:58:55 rillig Exp $ # +transform_setname "transform-ccc-cc" + case $arg in -###################################################################### + +# Standard options (except -g, which is handled later). +-[cEOo] |\ +-[DILlU]?* |\ +-O[01] ) transform_pass ;; + +# XXX: What's the benefit of -g3 over -g? +-g ) transform_to "-g3" ;; + # Directories for the runtime library search path are passed via # "-Wl,-rpath,<dir>", not "-Wl,-R<dir>". -###################################################################### --Wl,-R*) - arg="-Wl,-rpath,${arg#-Wl,-R}" - $debug_log $wrapperlog " (transform-ccc-cc) to: $arg" - addtocache=yes - ;; --W[LlSc],*) - addtocache=yes - ;; --W*) - arg= - $debug_log $wrapperlog " (transform-ccc-cc) to: $arg" - addtocache=yes - ;; --mieee) - arg="-ieee" - $debug_log $wrapperlog " (transform-ccc-cc) to: $arg" - addtocache=yes - ;; --g) - arg="-g3" - $debug_log $wrapperlog " (transform-ccc-cc) to: $arg" - addtocache=yes - ;; +-Wl,-R* ) transform_to "-Wl,-rpath,${arg#-Wl,-R}" ;; + +-W[LlSc],* ) transform_pass ;; + +# Ignore options that are likely to be GCC warnings. +-W* ) transform_discard_with_warning ;; + +-mieee ) transform_to "-ieee" ;; + +-* ) transform_pass_with_warning ;; + esac |