diff options
author | rillig <rillig> | 2007-01-17 13:19:47 +0000 |
---|---|---|
committer | rillig <rillig> | 2007-01-17 13:19:47 +0000 |
commit | 881404ad82272985738f01934f442092b782b9ee (patch) | |
tree | 529d2049de2ae9de4b660799ab713991ef6a58b1 /mk | |
parent | 4914793a0640f8145b1f66685d1e598d062a882e (diff) | |
download | pkgsrc-881404ad82272985738f01934f442092b782b9ee.tar.gz |
The sunpro wrapper needs to distinguish whether cc or CC is called in
some cases.
XXX: There should be more support in the infrastructure for this case.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/wrapper/transform-sunpro-cc | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/mk/wrapper/transform-sunpro-cc b/mk/wrapper/transform-sunpro-cc index 235acd0d5d3..13318388403 100644 --- a/mk/wrapper/transform-sunpro-cc +++ b/mk/wrapper/transform-sunpro-cc @@ -1,4 +1,4 @@ -# $NetBSD: transform-sunpro-cc,v 1.22 2007/01/14 18:56:25 rillig Exp $ +# $NetBSD: transform-sunpro-cc,v 1.23 2007/01/17 13:19:47 rillig Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -53,8 +53,8 @@ case $arg in -O* ) transform_discard_with_warning ;; # Directories for the runtime library search path are passed via -# simply "-R<dir>", not "-Wl,-R<dir>". -# XXX: Why? For me, -Wl,-R works equally well. +# simply "-R<dir>", not "-Wl,-R<dir>". This is because the C++ compiler +# does not know about the -W?,* options. -Wl,-R* ) transform_to "${arg#-Wl,}" ;; -R* ) transform_pass ;; @@ -63,13 +63,26 @@ case $arg in # Solaris' linker exports all dynamic symbols by default when # building a shared object. +-export-dynamic |\ -Wl,--export-dynamic |\ -Wl,-E ) transform_discard ;; --W[02aclmop],* ) transform_pass ;; +-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 ;; + 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 ;; + esac ;; # Ignore options that are probably meant for GCC. --W* ) transform_discard_with_warning ;; +-W* |\ +-Xc ) transform_discard_with_warning ;; -static ) transform_to "-Bstatic" ;; @@ -78,6 +91,7 @@ case $arg in -fPIC |\ -fpic ) transform_to "-Kpic" ;; +-KPIC ) transform_pass ;; # SunPro needs -mt -lpthread for POSIX threads. -pthread ) transform_to_and_split "-mt -lpthread" ;; @@ -89,6 +103,8 @@ case $arg in -fast ) transform_to_and_split "-fast -xnolibmopt" ;; # Pass through those options that SunPro understands. +-Bdynamic |\ +-Bstatic |\ -fd |\ -features* |\ -flags |\ @@ -101,8 +117,17 @@ case $arg in -fsingle |\ -fstore |\ -ftrap* |\ +-G |\ +-h*.so.* |\ -mt |\ --template=* ) transform_pass ;; +-template=* |\ +-xarch=* |\ +-xcode=* |\ +-xdepend |\ +-xstrconst |\ +-xtarget=* ) transform_pass ;; + +#-xc99 ) transform_to_and_split "-xc99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__" ;; # Ignore all other -f flags. -f* ) transform_discard_with_warning ;; |