summaryrefslogtreecommitdiff
path: root/mk/wrapper
diff options
context:
space:
mode:
authorrillig <rillig>2007-02-20 16:12:41 +0000
committerrillig <rillig>2007-02-20 16:12:41 +0000
commit724195872cc007f2bad42d9e65cd0d6139ca7334 (patch)
treecb71c80c68a3083200795f5eef1317c496614a0b /mk/wrapper
parent9596bb2934b3c947b1121fe50bbe6a3cc821a93a (diff)
downloadpkgsrc-724195872cc007f2bad42d9e65cd0d6139ca7334.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-cc23
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 |\