# HG changeset patch # User Dan Nicolaescu # Date 1277877067 25200 # Node ID 758d2fa60c5cac041b5461b860439561cfd42b6a # Parent 403dcf18b5c2401fd5b66d7af2e9ba2ee221e76e Fix CFLAGS for non-GCC compilers. * configure.in (CFLAGS): Always use -g like it was done before the 2010-03-30 change. (REAL_CFLAGS): Use CFLAGS for non-GCC to get optimization flags. (Bug#6538) diff -r 403dcf18b5c2 -r 758d2fa60c5c ChangeLog --- a/ChangeLog Tue Jun 29 21:29:49 2010 -0700 +++ b/ChangeLog Tue Jun 29 22:51:07 2010 -0700 @@ -1,3 +1,10 @@ +2010-06-30 Dan Nicolaescu + + Fix CFLAGS for non-GCC compilers. + * configure.in (CFLAGS): Always use -g like it was done before the + 2010-03-30 change. + (REAL_CFLAGS): Use CFLAGS for non-GCC to get optimization flags. (Bug#6538) + 2010-06-30 Glenn Morris * configure.in (HAVE_SOUND, HAVE_X_I18N, HAVE_X11R6_XIM): diff -r 403dcf18b5c2 -r 758d2fa60c5c configure --- a/configure Tue Jun 29 21:29:49 2010 -0700 +++ b/configure Tue Jun 29 22:51:07 2010 -0700 @@ -5436,21 +5436,18 @@ ### First figure out CFLAGS (which we use for running the compiler here) ### and REAL_CFLAGS (which we use for real compilation). -### The two are the same except on a few systems, where they are made -### different to work around various lossages. For example, -### GCC 2.5 on GNU/Linux needs them to be different because it treats -g -### as implying static linking. +### The two are the same except when using GCC where we might use +### extra warning and profiling flags. ### If the CFLAGS env var is specified, we use that value ### instead of the default. if test "x$SPECIFIED_CFLAGS" = x; then + CFLAGS="-g $C_OPTIMIZE_SWITCH" if test x$GCC = xyes; then - CFLAGS="-g $C_OPTIMIZE_SWITCH" REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS" else - CFLAGS= - REAL_CFLAGS= + REAL_CFLAGS="$CFLAGS" fi else REAL_CFLAGS="$CFLAGS" diff -r 403dcf18b5c2 -r 758d2fa60c5c configure.in --- a/configure.in Tue Jun 29 21:29:49 2010 -0700 +++ b/configure.in Tue Jun 29 22:51:07 2010 -0700 @@ -847,23 +847,19 @@ ### First figure out CFLAGS (which we use for running the compiler here) ### and REAL_CFLAGS (which we use for real compilation). -### The two are the same except on a few systems, where they are made -### different to work around various lossages. For example, -### GCC 2.5 on GNU/Linux needs them to be different because it treats -g -### as implying static linking. +### The two are the same except when using GCC where we might use +### extra warning and profiling flags. ### If the CFLAGS env var is specified, we use that value ### instead of the default. -dnl C_OPTIMIZE_SWITCH unused save for gcc, so why set it for non-gcc? dnl Note AC_PROG_CC sets CFLAGS to -g -O2 for gcc anyway. if test "x$SPECIFIED_CFLAGS" = x; then + CFLAGS="-g $C_OPTIMIZE_SWITCH" if test x$GCC = xyes; then - CFLAGS="-g $C_OPTIMIZE_SWITCH" REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS" else - CFLAGS= - REAL_CFLAGS= + REAL_CFLAGS="$CFLAGS" fi else REAL_CFLAGS="$CFLAGS"