pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/wrapper Converted the MIPSpro wrappers to use the t...
details: https://anonhg.NetBSD.org/pkgsrc/rev/0bea84a1ec83
branches: trunk
changeset: 522015:0bea84a1ec83
user: rillig <rillig%pkgsrc.org@localhost>
date: Thu Nov 30 13:00:16 2006 +0000
description:
Converted the MIPSpro wrappers to use the transform_* functions.
diffstat:
mk/wrapper/transform-mipspro-cc | 59 +++++++++++++-----------------
mk/wrapper/transform-mipspro-ucode-cc | 66 +++++++++++++---------------------
2 files changed, 52 insertions(+), 73 deletions(-)
diffs (166 lines):
diff -r f31c86fb592f -r 0bea84a1ec83 mk/wrapper/transform-mipspro-cc
--- a/mk/wrapper/transform-mipspro-cc Thu Nov 30 12:59:56 2006 +0000
+++ b/mk/wrapper/transform-mipspro-cc Thu Nov 30 13:00:16 2006 +0000
@@ -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 -r f31c86fb592f -r 0bea84a1ec83 mk/wrapper/transform-mipspro-ucode-cc
--- a/mk/wrapper/transform-mipspro-ucode-cc Thu Nov 30 12:59:56 2006 +0000
+++ b/mk/wrapper/transform-mipspro-ucode-cc Thu Nov 30 13:00:16 2006 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index