[Freeciv-Dev] (PR#2387) Standard config doesn't use -O2
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients:; |
Subject: |
[Freeciv-Dev] (PR#2387) Standard config doesn't use -O2 |
From: |
"Raimar Falke via RT" <rt@xxxxxxxxxxxxxx> |
Date: |
Sat, 23 Nov 2002 06:08:22 -0800 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
The default configure won't use -O2 in the CFLAGS. It was caused by
this change to configure.in:
revision 1.194
date: 2002/07/19 17:59:11; author: per; state: Exp; lines: +6 -5
Clean up autoconf handling of --enable-debug. Defaults not changed.
While I don't understand why this change broke it I have attached a
patch which fixes the current situation. The patch moves the FC_DEBUG
macro down after the AC_PROG_CC test. This test looks if any CFLAGS
are set if so it won't change anything. If CFLAGS is not set it will
append "-Wall" and "-O2" if gcc is found. So if we run FC_DEBUG before
AC_PROG_CC AC_PROG_CC won't add the "-O2". While cflags_set is used in
the FC_DEBUG macro is isn't set anywhere.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Microsoft DNS service terminates abnormally when it recieves a response
to a DNS query that was never made.
Fix Information: Run your DNS service on a different platform."
-- MS service information on bugtraq
Index: configure.in
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.in,v
retrieving revision 1.204
diff -u -r1.204 configure.in
--- configure.in 2002/11/14 09:28:31 1.204
+++ configure.in 2002/11/23 14:03:53
@@ -41,8 +41,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],
@@ -135,6 +133,9 @@
AC_PROG_CPP
AC_PROG_LN_S
AC_PROG_RANLIB
+
+dnl Add the flags for debugging
+FC_DEBUG
AC_CHECK_PROG(UNAME,uname,uname,:)
Index: m4/debug.m4
===================================================================
RCS file: /home/freeciv/CVS/freeciv/m4/debug.m4,v
retrieving revision 1.2
diff -u -r1.2 debug.m4
--- m4/debug.m4 2002/08/07 21:39:00 1.2
+++ m4/debug.m4 2002/11/23 14:03:56
@@ -9,13 +9,13 @@
esac], [enable_debug=some])
if test "x$enable_debug" = "xyes"; then
- test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
+ CFLAGS="$CFLAGS -g"
CPPFLAGS="$CPPFLAGS -DDEBUG"
else
if test "x$enable_debug" = "xno"; then
CPPFLAGS="$CPPFLAGS -DNDEBUG"
else
- test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
+ CFLAGS="$CFLAGS -g"
fi
fi
])
- [Freeciv-Dev] (PR#2387) Standard config doesn't use -O2,
Raimar Falke via RT <=
|
|