]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix CFLAGS for non-GCC compilers.
authorDan Nicolaescu <dann@ics.uci.edu>
Wed, 30 Jun 2010 05:51:07 +0000 (22:51 -0700)
committerDan Nicolaescu <dann@ics.uci.edu>
Wed, 30 Jun 2010 05:51:07 +0000 (22:51 -0700)
* 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)

ChangeLog
configure
configure.in

index c6564b916043f58af220093991618191994dc854..704647f3bc697fd776246f574a048261c425f5e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-30  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       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  <rgm@gnu.org>
 
        * configure.in (HAVE_SOUND, HAVE_X_I18N, HAVE_X11R6_XIM):
index 90718cf6aad718a5c8875c3a535014cc9d6d8df6..cb353569d78670890962eacca0db017c4633bdf0 100755 (executable)
--- a/configure
+++ b/configure
@@ -5436,21 +5436,18 @@ CPP=`eval "echo $CPP"`
 
 ### 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"
index bb2866b6654c0e7ec2e53a61ffb1a4bf6d2c3229..805ea9c413466dd98d3363a8d32c6a8d0e7f2590 100644 (file)
@@ -847,23 +847,19 @@ CPP=`eval "echo $CPP"`
 
 ### 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"