diff options
| author | Dan Nicolaescu | 2010-06-29 22:51:07 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-06-29 22:51:07 -0700 |
| commit | f71cd38ac42420fc0c7290e0adedf965749d74df (patch) | |
| tree | 14c22a29d15818874958fd9523a4e3f463eee7ed | |
| parent | f4981b7e31e98ed2f2d46733961c5ca211cc41c4 (diff) | |
| download | emacs-f71cd38ac42420fc0c7290e0adedf965749d74df.tar.gz emacs-f71cd38ac42420fc0c7290e0adedf965749d74df.zip | |
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)
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rwxr-xr-x | configure | 11 | ||||
| -rw-r--r-- | configure.in | 12 |
3 files changed, 15 insertions, 15 deletions
| @@ -1,3 +1,10 @@ | |||
| 1 | 2010-06-30 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | Fix CFLAGS for non-GCC compilers. | ||
| 4 | * configure.in (CFLAGS): Always use -g like it was done before the | ||
| 5 | 2010-03-30 change. | ||
| 6 | (REAL_CFLAGS): Use CFLAGS for non-GCC to get optimization flags. (Bug#6538) | ||
| 7 | |||
| 1 | 2010-06-30 Glenn Morris <rgm@gnu.org> | 8 | 2010-06-30 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * configure.in (HAVE_SOUND, HAVE_X_I18N, HAVE_X11R6_XIM): | 10 | * configure.in (HAVE_SOUND, HAVE_X_I18N, HAVE_X11R6_XIM): |
| @@ -5436,21 +5436,18 @@ CPP=`eval "echo $CPP"` | |||
| 5436 | 5436 | ||
| 5437 | ### First figure out CFLAGS (which we use for running the compiler here) | 5437 | ### First figure out CFLAGS (which we use for running the compiler here) |
| 5438 | ### and REAL_CFLAGS (which we use for real compilation). | 5438 | ### and REAL_CFLAGS (which we use for real compilation). |
| 5439 | ### The two are the same except on a few systems, where they are made | 5439 | ### The two are the same except when using GCC where we might use |
| 5440 | ### different to work around various lossages. For example, | 5440 | ### extra warning and profiling flags. |
| 5441 | ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g | ||
| 5442 | ### as implying static linking. | ||
| 5443 | 5441 | ||
| 5444 | ### If the CFLAGS env var is specified, we use that value | 5442 | ### If the CFLAGS env var is specified, we use that value |
| 5445 | ### instead of the default. | 5443 | ### instead of the default. |
| 5446 | 5444 | ||
| 5447 | if test "x$SPECIFIED_CFLAGS" = x; then | 5445 | if test "x$SPECIFIED_CFLAGS" = x; then |
| 5446 | CFLAGS="-g $C_OPTIMIZE_SWITCH" | ||
| 5448 | if test x$GCC = xyes; then | 5447 | if test x$GCC = xyes; then |
| 5449 | CFLAGS="-g $C_OPTIMIZE_SWITCH" | ||
| 5450 | REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS" | 5448 | REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS" |
| 5451 | else | 5449 | else |
| 5452 | CFLAGS= | 5450 | REAL_CFLAGS="$CFLAGS" |
| 5453 | REAL_CFLAGS= | ||
| 5454 | fi | 5451 | fi |
| 5455 | else | 5452 | else |
| 5456 | REAL_CFLAGS="$CFLAGS" | 5453 | REAL_CFLAGS="$CFLAGS" |
diff --git a/configure.in b/configure.in index bb2866b6654..805ea9c4134 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -847,23 +847,19 @@ CPP=`eval "echo $CPP"` | |||
| 847 | 847 | ||
| 848 | ### First figure out CFLAGS (which we use for running the compiler here) | 848 | ### First figure out CFLAGS (which we use for running the compiler here) |
| 849 | ### and REAL_CFLAGS (which we use for real compilation). | 849 | ### and REAL_CFLAGS (which we use for real compilation). |
| 850 | ### The two are the same except on a few systems, where they are made | 850 | ### The two are the same except when using GCC where we might use |
| 851 | ### different to work around various lossages. For example, | 851 | ### extra warning and profiling flags. |
| 852 | ### GCC 2.5 on GNU/Linux needs them to be different because it treats -g | ||
| 853 | ### as implying static linking. | ||
| 854 | 852 | ||
| 855 | ### If the CFLAGS env var is specified, we use that value | 853 | ### If the CFLAGS env var is specified, we use that value |
| 856 | ### instead of the default. | 854 | ### instead of the default. |
| 857 | 855 | ||
| 858 | dnl C_OPTIMIZE_SWITCH unused save for gcc, so why set it for non-gcc? | ||
| 859 | dnl Note AC_PROG_CC sets CFLAGS to -g -O2 for gcc anyway. | 856 | dnl Note AC_PROG_CC sets CFLAGS to -g -O2 for gcc anyway. |
| 860 | if test "x$SPECIFIED_CFLAGS" = x; then | 857 | if test "x$SPECIFIED_CFLAGS" = x; then |
| 858 | CFLAGS="-g $C_OPTIMIZE_SWITCH" | ||
| 861 | if test x$GCC = xyes; then | 859 | if test x$GCC = xyes; then |
| 862 | CFLAGS="-g $C_OPTIMIZE_SWITCH" | ||
| 863 | REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS" | 860 | REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS" |
| 864 | else | 861 | else |
| 865 | CFLAGS= | 862 | REAL_CFLAGS="$CFLAGS" |
| 866 | REAL_CFLAGS= | ||
| 867 | fi | 863 | fi |
| 868 | else | 864 | else |
| 869 | REAL_CFLAGS="$CFLAGS" | 865 | REAL_CFLAGS="$CFLAGS" |