summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2010-05-02 21:42:50 -0400
committerChong Yidong <cyd@stupidchicken.com>2010-05-02 21:42:50 -0400
commit9978c06c88315dce3071f6c4b284878f34c37c66 (patch)
tree5d3f43644c330b945ed23ca28ea1dd883372778c /configure
parentf5d6ff44b773b013502ad4de8715654c6c757407 (diff)
downloademacs-9978c06c88315dce3071f6c4b284878f34c37c66.tar.gz
Add check for buggy version of GCC (Bug#6031).
* configure.in: Add check for buggy version of GCC (Bug#6031). * configure: Regenerate * etc/NEWS: Minor tweak to problem description.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure b/configure
index 977510ee2e0..efb3dc8488e 100755
--- a/configure
+++ b/configure
@@ -25559,6 +25559,16 @@ fi
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/'`