diff options
author | jlam <jlam@pkgsrc.org> | 2004-01-06 08:48:29 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-01-06 08:48:29 +0000 |
commit | 3a61d3a9082340c76401bb2ad10f7afbb27caeac (patch) | |
tree | cd7bd9463980f389f8b2952a316859856a470b57 /mk | |
parent | 76085a8f5e9419ebb282bbfc7626669cc5bdaf99 (diff) | |
download | pkgsrc-3a61d3a9082340c76401bb2ad10f7afbb27caeac.tar.gz |
Try to convert GCC's optimization flags to SunPro optimization flags.
From Jonathan Perkin in private email.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/buildlink3/sunpro-cc-post-cache | 4 | ||||
-rw-r--r-- | mk/buildlink3/sunpro-cc-post-logic | 17 |
2 files changed, 18 insertions, 3 deletions
diff --git a/mk/buildlink3/sunpro-cc-post-cache b/mk/buildlink3/sunpro-cc-post-cache index 40ac4ca4fa7..f2a93bf9ce2 100644 --- a/mk/buildlink3/sunpro-cc-post-cache +++ b/mk/buildlink3/sunpro-cc-post-cache @@ -1,4 +1,4 @@ -# $NetBSD: sunpro-cc-post-cache,v 1.2 2003/09/02 07:00:02 jlam Exp $ +# $NetBSD: sunpro-cc-post-cache,v 1.3 2004/01/06 08:48:29 jlam Exp $ # # This file implements the default action of the "cc" private cache # for the SunPro suite of compilers, and tells the wrapper to skip the @@ -6,7 +6,7 @@ # can't handle; they will instead by handled directly by # sunpro-cc-post-logic. --W*) +-[OW]*) skipcache=yes ;; esac 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. |