summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorrillig <rillig>2006-11-30 12:49:57 +0000
committerrillig <rillig>2006-11-30 12:49:57 +0000
commitcef80ffd41d7a0e98a1fcbb1df3ceabb52d73c00 (patch)
tree68c563b7607a1cc3788f1cd76c14afe6bab8fd9e /mk
parent69ad2590c11e13dfc5c6a4439c58fda0a4fdff5c (diff)
downloadpkgsrc-cef80ffd41d7a0e98a1fcbb1df3ceabb52d73c00.tar.gz
Adjusted the indentation and the order of checks to match the other
files.
Diffstat (limited to 'mk')
-rw-r--r--mk/wrapper/transform-sunpro-cc202
1 files changed, 82 insertions, 120 deletions
diff --git a/mk/wrapper/transform-sunpro-cc b/mk/wrapper/transform-sunpro-cc
index e113d9629aa..0fa706c16b4 100644
--- a/mk/wrapper/transform-sunpro-cc
+++ b/mk/wrapper/transform-sunpro-cc
@@ -1,4 +1,4 @@
-# $NetBSD: transform-sunpro-cc,v 1.17 2006/11/29 17:36:15 rillig Exp $
+# $NetBSD: transform-sunpro-cc,v 1.18 2006/11/30 12:49:57 rillig Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -35,125 +35,87 @@
# POSSIBILITY OF SUCH DAMAGE.
transform_setname "transform-sunpro-cc"
+
case $arg in
--E)
- transform_pass ;;
-
--MM)
- # Create dependency lines for Makefiles
- transform_to "-xM1"
- ;;
-
--O[12345])
- # SunPro can handle -xO<n> (n={1|2|3|4|5}), so optimistically
- # convert those GCC -O<n> values to -xO<n>.
- transform_to "-xO${arg#-O}"
- ;;
-
--O?*)
- # Silently ignore all other -O* options, except for "-O", which
- # SunPro interprets as asking for the default optimization level.
- transform_discard
- ;;
-
--Wl,-R*)
- # Directories for the runtime library search path are passed via
- # simply "-R<dir>", not "-Wl,-R<dir>".
- transform_to "${arg#-Wl,}"
- ;;
--R*)
- transform_pass
- ;;
-
--Wl,-soname=*)
- # SunPro uses -h to set the shared object name.
- transform_to "-h${arg#-Wl,-soname=}"
- ;;
-
--Wl,--export-dynamic|\
--Wl,-E)
- # Solaris' linker exports all dynamic symbols by default when
- # building a shared object.
- transform_discard
- ;;
-
--Wl,*)
- # SunPro compiler accepts -Wl,* so just pass it on through.
- addtocache=yes
- ;;
-
--W*)
- # SunPro compilers don't understand any other -W* arguments,
- # so just silently ignore the rest.
- transform_discard
- ;;
-
--static)
- # Solaris' linker uses -Bstatic to create static objects.
- transform_to "-Bstatic"
- ;;
-
---export-dynamic|\
--shared)
- # Solaris' linker uses -G to create shared objects.
- transform_to "-G"
- ;;
-
--f[Pp][Ii][Cc])
- # SunPro uses -Kpic to create position independent code.
- transform_to "-Kpic"
- ;;
-
--pthread)
- # SunPro needs -mt -lpthread for POSIX threads.
- transform_to "-mt -lpthread"
- split_arg=yes
- ;;
-
--fast)
- # -fast implies -xlibmopt, which uses the optimized math
- # routines in libsunmath. libsunmath is only available as part of
- # SunPro, so disable the use of the optimized math library
- # (at least until it can be statically linked).
- transform_to "-fast -xnolibmopt"
- split_arg=yes
- ;;
-
--fd|\
--features*|\
--flags|\
--flteval*|\
--fnonstd*|\
--fns*|\
--fprecision*|\
--fround*|\
--fsimple*|\
--fsingle|\
--fstore|\
--ftrap*)
- # Pass through -f flags that SunPro understands.
- addtocache=yes
- ;;
-
--f*)
- # Ignore all other -f flags.
- transform_discard
- ;;
-
--ansi|\
--pedantic|\
--pipe|\
--traditional)
- # Ignore some flags that are unnecessary for SunPro.
- transform_discard
- ;;
-
--[DILlU]*|\
--[cgOo])
- transform_pass
- ;;
--*)
- transform_pass_with_warning
- ;;
+# Standard options.
+-[cEgOos] |\
+-[DILlU]?* |\
+-O[01] ) transform_pass ;;
+
+# Create dependency lines for Makefiles
+-MM ) transform_to "-xM1" ;;
+
+# SunPro can handle -xO<n> (n={1|2|3|4|5}), so optimistically
+# convert those GCC -O<n> values to -xO<n>.
+-O[2345] ) transform_to "-xO${arg#-O}" ;;
+
+# Ignore all other -O* options.
+-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.
+-Wl,-R* ) transform_to "${arg#-Wl,}" ;;
+-R* ) transform_pass ;;
+
+# SunPro uses -h to set the shared object name.
+-Wl,-soname=* ) transform_to "-h${arg#-Wl,-soname=}" ;;
+
+# Solaris' linker exports all dynamic symbols by default when
+# building a shared object.
+-Wl,--export-dynamic |\
+-Wl,-E ) transform_discard ;;
+
+# Let the options to the linker pass unmodified.
+-Wl,* ) transform_pass ;;
+
+# Ignore options that are probably meant for GCC.
+-W* ) transform_discard_with_warning ;;
+
+# Solaris' linker uses -Bstatic to create static objects.
+-static ) transform_to "-Bstatic" ;;
+
+# Solaris' linker uses -G to create shared objects.
+--export-dynamic |\
+-shared ) transform_to "-G" ;;
+
+-fPIC |\
+-fpic ) transform_to "-Kpic" ;;
+
+# SunPro needs -mt -lpthread for POSIX threads.
+-pthread ) transform_to_and_split "-mt -lpthread" ;;
+
+# -fast implies -xlibmopt, which uses the optimized math
+# routines in libsunmath. libsunmath is only available as part of
+# SunPro, so disable the use of the optimized math library
+# (at least until it can be statically linked).
+-fast ) transform_to_and_split "-fast -xnolibmopt" ;;
+
+# Pass through those -f flags that SunPro understands.
+-fd |\
+-features* |\
+-flags |\
+-flteval* |\
+-fnonstd* |\
+-fns* |\
+-fprecision* |\
+-fround* |\
+-fsimple* |\
+-fsingle |\
+-fstore |\
+-ftrap* ) transform_pass ;;
+
+# Ignore all other -f flags.
+-f* ) transform_discard_with_warning ;;
+
+# Ignore some flags that are unnecessary for SunPro.
+-ansi |\
+-pedantic |\
+-pipe |\
+-traditional ) transform_discard ;;
+
+# Unknown options.
+-* ) transform_pass_with_warning ;;
+
esac