From e2b8cec05b2d18892c8375b575a727dbeb95c864 Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 11 Aug 2014 19:41:05 -0700 Subject: [PATCH] configure: add work around for gcc-4.9 aarch64 bug add -frename-registers to avoid: src/dsp/dec_neon.c:1234:1: internal compiler error: in simplify_const_unary_operation, at simplify-rtx.c:1539 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62040 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61622 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757738 Change-Id: I52fb3a29ac30b82b27da05378bdb495ddebb97d7 --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configure.ac b/configure.ac index 32b99e9a..4f1ef58d 100644 --- a/configure.ac +++ b/configure.ac @@ -62,6 +62,19 @@ TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wshadow]) TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wunused-but-set-variable]) TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wunused]) TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-Wvla]) +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62040 +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61622 +AS_IF([test "$GCC" = "yes" ], [ + gcc_version=`$CC -dumpversion` + gcc_wht_bug="" + case "$host_cpu" in + aarch64|arm64) + case "$gcc_version" in + 4.9|4.9.0|4.9.1) gcc_wht_bug=yes ;; + esac + esac + AS_IF([test "$gcc_wht_bug" = "yes"], [ + TEST_AND_ADD_CFLAGS([AM_CFLAGS], [-frename-registers])])]) AC_SUBST([AM_CFLAGS]) dnl === Check for machine specific flags