summaryrefslogtreecommitdiff
path: root/mk/buildlink3/sunpro-cc-post-logic
diff options
context:
space:
mode:
Diffstat (limited to 'mk/buildlink3/sunpro-cc-post-logic')
-rw-r--r--mk/buildlink3/sunpro-cc-post-logic30
1 files changed, 30 insertions, 0 deletions
diff --git a/mk/buildlink3/sunpro-cc-post-logic b/mk/buildlink3/sunpro-cc-post-logic
new file mode 100644
index 00000000000..d78d6bf1ea3
--- /dev/null
+++ b/mk/buildlink3/sunpro-cc-post-logic
@@ -0,0 +1,30 @@
+# $NetBSD: sunpro-cc-post-logic,v 1.2 2003/09/02 07:00:03 jlam Exp $
+#
+# Silently accept some GCC compiler arguments by silently converting
+# them to the SunPro compiler equivalents. This makes the SunPro
+# compiler wrappers work with more software that seems to assume GCC
+# nowadays.
+
+case $arg in
+-Werror)
+ # "-errwarn" is the right way to convince the SunPro compiler
+ # to stop on compilation warnings.
+ #
+ arg="-errwarn"
+ addtoprivatecache=yes
+ ;;
+-Wl,-R*)
+ # Directories for the runtime library search path are passed
+ # via simply "-R<dir>", not "-Wl,-R<dir>".
+ #
+ arg=`$echo "X$arg" | $Xsed -e "s|^-Wl,||g" -e "s|,| |g"`
+ addtoprivatecache=yes
+ ;;
+-W*)
+ # In fact, SunPro compilers don't even understand any -W*
+ # arguments, so just silently ignore them all.
+ #
+ arg=
+ addtoprivatecache=yes
+ ;;
+esac