summaryrefslogtreecommitdiff
path: root/mk/wrapper
diff options
context:
space:
mode:
authorrillig <rillig>2006-11-30 13:00:16 +0000
committerrillig <rillig>2006-11-30 13:00:16 +0000
commit8d0425da9188a74590cf1cc557a91d23d88583d9 (patch)
tree7eb803b737492e6f7671c467e7fdfcbd6bb989ab /mk/wrapper
parent278279f73a4085b5744379f8cae8970dd9a2a724 (diff)
downloadpkgsrc-8d0425da9188a74590cf1cc557a91d23d88583d9.tar.gz
Converted the MIPSpro wrappers to use the transform_* functions.
Diffstat (limited to 'mk/wrapper')
-rw-r--r--mk/wrapper/transform-mipspro-cc59
-rw-r--r--mk/wrapper/transform-mipspro-ucode-cc66
2 files changed, 52 insertions, 73 deletions
diff --git a/mk/wrapper/transform-mipspro-cc b/mk/wrapper/transform-mipspro-cc
index 02ac4bd2a2d..0466b71eded 100644
--- a/mk/wrapper/transform-mipspro-cc
+++ b/mk/wrapper/transform-mipspro-cc
@@ -1,4 +1,4 @@
-# $NetBSD: transform-mipspro-cc,v 1.3 2006/09/17 18:46:00 rillig Exp $
+# $NetBSD: transform-mipspro-cc,v 1.4 2006/11/30 13:00:16 rillig Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -34,45 +34,38 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
+transform_setname "transform-mipspro-cc"
+
case $arg in
-######################################################################
-# MIPSpro can handle -O[123] and -Ofast[=platform], so just pass them
+
+# Standard options.
+-[cEgOos] |\
+-[DILlU]?* |\
+-O[01] ) transform_pass ;;
+
+
+# MIPSpro can handle -O[23] and -Ofast[=platform], so just pass them
# on through.
-######################################################################
--O[123]|-Ofast|-Ofast=*)
- addtocache=yes
- ;;
-######################################################################
+-O[23] |\
+-Ofast |\
+-Ofast=* ) transform_pass ;;
+
# Ignore all other -O* options.
-######################################################################
--O*)
- arg=
- $debug_log $wrapperlog " (transform-mipspro-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
+-O* ) transform_discard_with_warning ;;
+
# 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-mipspro-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
+-Wl,-R* ) transform_to "-Wl,-rpath,${arg#-Wl,-R}" ;;
+
# The MIPSpro compiler accepts these -W* directives, so just pass them
# on through.
-######################################################################
--W[ablfpR]*,*)
- addtocache=yes
- ;;
-######################################################################
+-W[ablfpR]*,* ) transform_pass ;;
+
# Ignore all of the other -W* directives, which are likely to be
# GCCisms.
-######################################################################
--W*)
- arg=
- $debug_log $wrapperlog " (transform-mipspro-cc) to: $arg"
- addtocache=yes
- ;;
+-W* ) transform_discard_with_warning ;;
+
+# Unknown options.
+-* ) transform_pass_with_warning ;;
+
esac
diff --git a/mk/wrapper/transform-mipspro-ucode-cc b/mk/wrapper/transform-mipspro-ucode-cc
index 835a8d56d0f..f681d938628 100644
--- a/mk/wrapper/transform-mipspro-ucode-cc
+++ b/mk/wrapper/transform-mipspro-ucode-cc
@@ -1,4 +1,4 @@
-# $NetBSD: transform-mipspro-ucode-cc,v 1.3 2006/09/17 18:46:00 rillig Exp $
+# $NetBSD: transform-mipspro-ucode-cc,v 1.4 2006/11/30 13:00:16 rillig Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -34,51 +34,37 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
+transform_setname "transform-mipspro-ucode-cc"
+
case $arg in
-######################################################################
-# MIPSpro can handle -O[0123] so just pass them on through.
-######################################################################
--O[0123])
- addtocache=yes
- ;;
-######################################################################
+
+# Standard options.
+-[cEgOos] |\
+-[DILlU]?* |\
+-O[01] ) transform_pass ;;
+
+# MIPSpro can handle -O[23] so just pass them on through.
+-O[23] ) transform_pass ;;
+
# Ignore all other -O* options.
-######################################################################
--O*)
- arg=
- $debug_log $wrapperlog " (transform-mipspro-ucode-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
+-O* ) transform_discard_with_warning ;;
+
# 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-mipspro-ucode-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
+-Wl,-R* ) transform_to "-Wl,-rpath,${arg#-Wl,-R}" ;;
+
# The MIPSpro compiler accepts -Wl,* so just pass it on through.
-######################################################################
--Wl,*)
- addtocache=yes
- ;;
-######################################################################
+-Wl,* ) transform_pass ;;
+
# Ignore all of the other -W* directives, which are likely to be
# GCCisms.
-######################################################################
--W*)
- arg=
- $debug_log $wrapperlog " (transform-mipspro-ucode-cc) to: $arg"
- addtocache=yes
- ;;
-######################################################################
+-W* ) transform_discard_with_warning ;;
+
# The MIPSpro compiler uses -KPIC to create position independent code.
-######################################################################
--f[Pp][Ii][Cc])
- arg="-KPIC"
- $debug_log $wrapperlog " (transform-mipspro-ucode-cc) to: $arg"
- addtocache=yes
- ;;
+-fPIC |\
+-fpic ) transform_to "-KPIC" ;;
+
+# Unknown options.
+-* ) transform_pass_with_warning ;;
+
esac