diff options
author | jlam <jlam> | 2004-01-06 08:48:29 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-01-06 08:48:29 +0000 |
commit | aaf8aa21a67598dea9f7fb20c91002b066d05ab1 (patch) | |
tree | cd7bd9463980f389f8b2952a316859856a470b57 /mk/buildlink3/sunpro-cc-post-logic | |
parent | 7ae71b709e762683245f50fa9bc1eea06221ed37 (diff) | |
download | pkgsrc-aaf8aa21a67598dea9f7fb20c91002b066d05ab1.tar.gz |
Try to convert GCC's optimization flags to SunPro optimization flags.
From Jonathan Perkin in private email.
Diffstat (limited to 'mk/buildlink3/sunpro-cc-post-logic')
-rw-r--r-- | mk/buildlink3/sunpro-cc-post-logic | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mk/buildlink3/sunpro-cc-post-logic b/mk/buildlink3/sunpro-cc-post-logic index d78d6bf1ea3..1b9d53ba470 100644 --- a/mk/buildlink3/sunpro-cc-post-logic +++ b/mk/buildlink3/sunpro-cc-post-logic @@ -1,4 +1,4 @@ -# $NetBSD: sunpro-cc-post-logic,v 1.2 2003/09/02 07:00:03 jlam Exp $ +# $NetBSD: sunpro-cc-post-logic,v 1.3 2004/01/06 08:48:29 jlam Exp $ # # Silently accept some GCC compiler arguments by silently converting # them to the SunPro compiler equivalents. This makes the SunPro @@ -6,6 +6,21 @@ # nowadays. case $arg in +-O[12345]) + # SunPro can handle -xO<n> (n={1|2|3|4|5}), so optimistically + # convert those GCC -O<n> values to -xO<n>. + # + arg=`$echo "X$arg" | $Xsed -e "s|^-O|-xO|g"` + addtoprivatecache=yes + ;; +-O?*) + # Siliently ignore all other -O* options, except for "-O", + # which SunPro interprets as asking for the default + # optimization level. + # + arg= + addtoprivatecache=yes + ;; -Werror) # "-errwarn" is the right way to convince the SunPro compiler # to stop on compilation warnings. |