Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] (PR#3515) Adding -O3 -fomit-frame-poiter with --enable-deb
Home

[Freeciv-Dev] (PR#3515) Adding -O3 -fomit-frame-poiter with --enable-deb

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#3515) Adding -O3 -fomit-frame-poiter with --enable-debug=no
From: "Rafa³ Bursig" <bursig@xxxxxxxxx>
Date: Mon, 24 Feb 2003 07:46:14 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Hi

  This code add -O3 -fomit-frame-pointer as default flags and turn off 
debuging with --enable-debug=no setting. Default setting is still 
--enable-debug=some which give -g -O2 flags.

Rafal
diff -u -r freeciv/configure.ac fc5/configure.ac
--- freeciv/configure.ac        Thu Feb 13 16:48:18 2003
+++ fc5/configure.ac    Mon Feb 24 16:14:20 2003
@@ -42,8 +42,6 @@
 
 AM_MAINTAINER_MODE
 
-FC_DEBUG
-
 dnl  no=do not compile server,  yes=compile server,  *=error
 AC_ARG_ENABLE(server,
 [  --disable-server        do not compile the server],
@@ -249,15 +247,17 @@
   fi
 fi
 
-
 dnl note this has to match the path installed by po/Makefile
 FC_EXPAND_DIR(LOCALEDIR, '${prefix}/share/locale')
 AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR", [Locale directory])
 
 if test -n "$GCC"; then
-   CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes 
-Wmissing-declarations"
+   EXTRA_GCC_DEBUG_CFLAGS="$CFLAGS"   
+   CFLAGS="-Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes 
-Wmissing-declarations"
 fi
 
+FC_DEBUG
+
 if test "$CVS_DEPS" = "maybe"; then
    dnl Should also check for gmake?
    if test -n "$GCC"; then
@@ -670,7 +670,7 @@
    fi]],[[]])
 
 if test -n "$GCC"; then
-  CFLAGS="$CFLAGS $EXTRA_GCC_DEBUG_CFLAGS"
+  CFLAGS="$EXTRA_GCC_DEBUG_CFLAGS $CFLAGS"
 fi
 
 AC_CONFIG_FILES([Makefile
diff -u -r freeciv/m4/debug.m4 fc5/m4/debug.m4
--- freeciv/m4/debug.m4 Thu Feb 13 16:48:22 2003
+++ fc5/m4/debug.m4     Mon Feb 24 16:09:30 2003
@@ -8,15 +8,14 @@
   *)   AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
 esac], [enable_debug=some])
 
-EXTRA_GCC_DEBUG_CFLAGS=""
-
 dnl -g is added by AC_PROG_CC if the compiler understands it
 if test "x$enable_debug" = "xyes"; then
   AC_DEFINE(DEBUG, 1, [Define if you want extra debugging.])
-  EXTRA_GCC_DEBUG_CFLAGS="-Werror"
+  EXTRA_GCC_DEBUG_CFLAGS="$EXTRA_GCC_DEBUG_CFLAGS -Werror"
 else
   if test "x$enable_debug" = "xno"; then
     AC_DEFINE(NDEBUG, 1, [Define if you want no debug support.])
+    EXTRA_GCC_DEBUG_CFLAGS="-O3 -fomit-frame-pointer"
   fi
 fi
 ])

[Prev in Thread] Current Thread [Next in Thread]