pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Try to convert GCC's optimization flags ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2c2c48971e0e
branches: trunk
changeset: 465805:2c2c48971e0e
user: jlam <jlam%pkgsrc.org@localhost>
date: Tue Jan 06 08:48:29 2004 +0000
description:
Try to convert GCC's optimization flags to SunPro optimization flags.
>From Jonathan Perkin in private email.
diffstat:
mk/buildlink3/sunpro-cc-post-cache | 4 ++--
mk/buildlink3/sunpro-cc-post-logic | 17 ++++++++++++++++-
2 files changed, 18 insertions(+), 3 deletions(-)
diffs (49 lines):
diff -r 6047da833f60 -r 2c2c48971e0e mk/buildlink3/sunpro-cc-post-cache
--- a/mk/buildlink3/sunpro-cc-post-cache Tue Jan 06 08:29:59 2004 +0000
+++ b/mk/buildlink3/sunpro-cc-post-cache Tue Jan 06 08:48:29 2004 +0000
@@ -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 -r 6047da833f60 -r 2c2c48971e0e mk/buildlink3/sunpro-cc-post-logic
--- a/mk/buildlink3/sunpro-cc-post-logic Tue Jan 06 08:29:59 2004 +0000
+++ b/mk/buildlink3/sunpro-cc-post-logic Tue Jan 06 08:48:29 2004 +0000
@@ -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.
Home |
Main Index |
Thread Index |
Old Index