]> git.eshelyaron.com Git - emacs.git/commitdiff
Add check for buggy version of GCC (Bug#6031).
authorChong Yidong <cyd@stupidchicken.com>
Mon, 3 May 2010 01:42:50 +0000 (21:42 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Mon, 3 May 2010 01:42:50 +0000 (21:42 -0400)
* configure.in: Add check for buggy version of GCC (Bug#6031).
* configure: Regenerate
* etc/NEWS: Minor tweak to problem description.

ChangeLog
configure
configure.in
etc/PROBLEMS

index a6ed97372458bb90354f1e49c9f9c891798fbe23..6936d80ba8f2710aa77ebc8006d2c6d862609eeb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-03  Chong Yidong  <cyd@stupidchicken.com>
+
+       * configure.in: Add check for buggy version of GCC (Bug#6031).
+
 2010-01-31  Juri Linkov  <juri@jurta.org>
 
        * .bzrignore: Add TAGS-LISP.
index 977510ee2e046a01a9dfd3a18e67526c3e65b5e5..efb3dc8488e1d8c6e4af9bac9d9263f2ad91fb50 100755 (executable)
--- a/configure
+++ b/configure
 CFLAGS="$REAL_CFLAGS"
 CPPFLAGS="$REAL_CPPFLAGS"
 
+## Hack to detect a buggy GCC version.
+if test "x$GCC" = xyes \
+   && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
+   && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
+   && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
+   { { $as_echo "$as_me:$LINENO: error: GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." >&5
+$as_echo "$as_me: error: GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
 #### Find out which version of Emacs this is.
 version=`grep 'defconst[        ]*emacs-version' ${srcdir}/lisp/version.el \
         | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
index 2315c2670526c37069ddc05b11ce1bf1487ceb96..9069895508d2ce7e9c6d34f99468f9ad23d18ea0 100644 (file)
@@ -2600,6 +2600,14 @@ dnl Fixme: Use AC_FUNC_MEMCMP since memcmp is used.  (Needs libobj replacement.)
 CFLAGS="$REAL_CFLAGS"
 CPPFLAGS="$REAL_CPPFLAGS"
 
+## Hack to detect a buggy GCC version.
+if test "x$GCC" = xyes \
+   && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
+   && test x"`echo $CFLAGS | grep '\-O@<:@23@:>@'`" != x \
+   && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
+   AC_MSG_ERROR([GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'.])
+fi
+
 #### Find out which version of Emacs this is.
 [version=`grep 'defconst[       ]*emacs-version' ${srcdir}/lisp/version.el \
         | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`]
index 634547770804d54f974ea5063d518aefb43cf42f..b3cda374c5141cc42bf8a57df767696c3c89c227 100644 (file)
@@ -167,7 +167,7 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239344
 
 * Crash bugs
 
-** Emacs crashes when running in a terminal, if compiled with gcc-4.5.
+** Emacs crashes when running in a terminal, if compiled with GCC 4.5.0
 This version of GCC is buggy: see
 
   http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6031