From de037fcdab66729d271c4915a28374dbebe12073 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 19 Feb 2010 09:26:19 +0100 Subject: [PATCH] use -O1 optimization level for gcc 4.2 gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4) seems to miscopile isl with -O2 --- m4/ax_cc_maxopt.m4 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/m4/ax_cc_maxopt.m4 b/m4/ax_cc_maxopt.m4 index da415be..92d522d 100644 --- a/m4/ax_cc_maxopt.m4 +++ b/m4/ax_cc_maxopt.m4 @@ -149,6 +149,16 @@ if test "$ac_test_CFLAGS" != "set"; then AX_CHECK_COMPILER_FLAGS(-ffast-math, CFLAGS="$CFLAGS -ffast-math") AX_GCC_ARCHFLAG($acx_maxopt_portable) + + # drop to -O1 for gcc 4.2 + $CC --version | + sed -e 's/.* \(@<:@0-9@:>@@<:@0-9@:>@*\)\.\(@<:@0-9@:>@@<:@0-9@:>@*\).*/\1 \2/' | + (read major minor + if test $major -eq 4 -a $minor -eq 2; then + exit 0 + fi + exit 1 + ) && CFLAGS="-O1" ;; esac -- 2.7.4