diff options
author | rillig <rillig@pkgsrc.org> | 2007-02-20 16:12:41 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2007-02-20 16:12:41 +0000 |
commit | f1bc7a12105aed37b93e3d5a0f36b124c20c6aab (patch) | |
tree | cb71c80c68a3083200795f5eef1317c496614a0b /mk/wrapper | |
parent | 939b8b517d04a16e62e5c96ffde487da541b7fdc (diff) | |
download | pkgsrc-f1bc7a12105aed37b93e3d5a0f36b124c20c6aab.tar.gz |
Mapping command line options to the ABI is not as simple as I thought:
-32 does _not_ belong to ABI 32. Instead, the mapping is:
ABI Options
(undef) -o32 -32
32 -n32
64 -64
While here, allowing -OPT:* to pass through to the compiler, since it
will understand it.
This should fix PR 35729.
Diffstat (limited to 'mk/wrapper')
-rw-r--r-- | mk/wrapper/transform-mipspro-cc | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/mk/wrapper/transform-mipspro-cc b/mk/wrapper/transform-mipspro-cc index 9ea3d1c4cfe..9e749cce516 100644 --- a/mk/wrapper/transform-mipspro-cc +++ b/mk/wrapper/transform-mipspro-cc @@ -1,4 +1,4 @@ -# $NetBSD: transform-mipspro-cc,v 1.8 2007/02/19 14:50:33 rillig Exp $ +# $NetBSD: transform-mipspro-cc,v 1.9 2007/02/20 16:12:41 rillig Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -36,6 +36,15 @@ transform_setname "transform-mipspro-cc" +# usage: mipspro_check_abi "abi" +mipspro_check_abi() { + if [ "$wrapper_abi" = "$1" ]; then + transform_pass + else + transform_fail "Wrong ABI argument $arg for ABI $wrapper_abi." + fi +} + case $arg in # Standard options. @@ -48,7 +57,8 @@ case $arg in # on through. -O[23] |\ -Ofast |\ --Ofast=* ) transform_pass ;; +-Ofast=* |\ +-OPT:* ) transform_pass ;; # Ignore all other -O* options. -O* ) transform_discard_with_warning ;; @@ -62,12 +72,9 @@ case $arg in -W[ablfpR]*,* ) transform_pass ;; -32 |\ --n32 |\ --64 ) if [ $arg = "-$wrapper_abi" ]; then - transform_pass - else - transform_fail "Wrong ABI argument $arg for ABI $wrapper_abi." - fi ;; +-o32 ) mipspro_check_abi "" ;; +-n32 ) mipspro_check_abi "32" ;; +-64 ) mipspro_check_abi "64" ;; -c99 |\ -M |\ |