Changeset: 26f27da4e8ab for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=26f27da4e8ab
Modified Files:
        buildtools/conf/MonetDB.m4
Branch: Oct2010
Log Message:

with --enable-optimize: remove "-O2" from default CFLAGS before we add our own 
"-Ox"
(as some compilers do not really like having multiple -Ox on their commandline)


diffs (30 lines):

diff -r 9a5d7f31fab0 -r 26f27da4e8ab buildtools/conf/MonetDB.m4
--- a/buildtools/conf/MonetDB.m4        Wed Dec 15 10:39:28 2010 +0100
+++ b/buildtools/conf/MonetDB.m4        Wed Dec 15 10:47:52 2010 +0100
@@ -1797,9 +1797,14 @@
   elif test "x$enable_instrument" = xyes; then
     AC_MSG_ERROR([combining --enable-optimize and --enable-instrument is not 
(yet?) possible.])
   else
+    dnl  prepare
+    CFLAGS=" $CFLAGS "
     dnl  remove "-g" as some compilers don't like "-g -Ox" combinations
-    CFLAGS=" $CFLAGS "
-    CFLAGS="`echo "$CFLAGS" | sed -e 's| -g | |g' -e 's|^ ||' -e 's| $||'`"
+    CFLAGS="`echo "$CFLAGS" | sed -e 's| -g | |g'`"
+    dnl  remove default "-O2" as we add "-Ox"
+    CFLAGS="`echo "$CFLAGS" | sed -e 's| -O2 | |g'`"
+    dnl  clean-up
+    CFLAGS="`echo "$CFLAGS" | sed -e 's|^ ||' -e 's| $||'`"
     JAVACFLAGS=" $JAVACFLAGS "
     JAVACFLAGS="`echo "$JAVACFLAGS" | sed -e 's| -g | |g' -e 's| -g:[[a-z]]* | 
|g' -e 's|^ ||' -e 's| $||'`"
     dnl  Optimization flags
@@ -1881,7 +1886,8 @@
       *aix*-)          CFLAGS="$CFLAGS -O3"
                        NO_INLINE_CFLAGS="$NO_INLINE_CFLAGS -qnooptimize"
                        ;;
-      *-*-*-)          ;;
+      *-*-*-)          CFLAGS="$CFLAGS -O2"
+                       ;;
 
       dnl  With icc-8.*, Interprocedural (IP) Optimization does not seem to 
work with MonetDB:
       dnl  With "-ipo -ipo_obj", pass-through linker options ("-Wl,...") are 
not handled correctly,
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to