Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Chong Yidong committed May 3, 2010
1 parent 0a32f71 commit bcb106a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
4 changes: 4 additions & 0 deletions 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.
Expand Down
10 changes: 10 additions & 0 deletions configure
Expand Up @@ -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/'`
Expand Down
8 changes: 8 additions & 0 deletions configure.in
Expand Up @@ -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/'`]
Expand Down
2 changes: 1 addition & 1 deletion etc/PROBLEMS
Expand Up @@ -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
Expand Down

0 comments on commit bcb106a

Please sign in to comment.