diff options
author | rillig <rillig@pkgsrc.org> | 2007-02-06 20:33:50 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2007-02-06 20:33:50 +0000 |
commit | fdd5258a69b5ee28d400710d2e7bc52c61911a5f (patch) | |
tree | 9f48ee730eee4fb288ccd5582e650a5f18a7d9d4 /mk/wrapper/transform-sunpro-cc | |
parent | f705bc4de846050fc0ee4765e09eedbacecaf5ca (diff) | |
download | pkgsrc-fdd5258a69b5ee28d400710d2e7bc52c61911a5f.tar.gz |
Added a new variable wrapper_type to the wrappers, so that the
transformations can decide whether they happen in a C or a C++ compiler.
Now the wrappers don't depend on the basename of the executed compiler
wrapper anymore.
Fixes PR 35555.
Diffstat (limited to 'mk/wrapper/transform-sunpro-cc')
-rw-r--r-- | mk/wrapper/transform-sunpro-cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mk/wrapper/transform-sunpro-cc b/mk/wrapper/transform-sunpro-cc index 13318388403..660ee034e98 100644 --- a/mk/wrapper/transform-sunpro-cc +++ b/mk/wrapper/transform-sunpro-cc @@ -1,4 +1,4 @@ -# $NetBSD: transform-sunpro-cc,v 1.23 2007/01/17 13:19:47 rillig Exp $ +# $NetBSD: transform-sunpro-cc,v 1.24 2007/02/06 20:33:51 rillig Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -67,17 +67,17 @@ case $arg in -Wl,--export-dynamic |\ -Wl,-E ) transform_discard ;; --W[02aclmop],* ) case ${0##*/} in - cc | gcc) transform_pass ;; - CC | g++ | c++) transform_discard_with_warning ;; - *) echo "ERROR: [transform-sunpro-cc] cmd = $0"; exit 1 ;; +-W[02aclmop],* ) case $wrapper_type in + CC) transform_pass ;; + CXX) transform_discard_with_warning ;; + *) echo "ERROR: [transform-sunpro-cc] unknown wrapper type: $wrapper_type"; exit 1 ;; esac ;; -Wall |\ --W ) case ${0##*/} in - cc | gcc) transform_to "-v" ;; - CC | g++ | c++) transform_to_and_split "+w +w2" ;; - *) echo "ERROR: [transform-sunpro-cc] cmd = $0"; exit 1 ;; +-W ) case $wrapper_type in + CC) transform_to "-v" ;; + CXX) transform_to_and_split "+w +w2" ;; + *) echo "ERROR: [transform-sunpro-cc] unknown wrapper type: $wrapper_type"; exit 1 ;; esac ;; # Ignore options that are probably meant for GCC. |