From f1f6fd217bb1f094b5c99ca413bcce79d32f0847 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Fri, 21 May 2010 16:50:05 +0000 Subject: [PATCH] Unset $CFLAGS for "GNU non-executable stack" configure test; fixes #3889 With gcc 4.4 we get Error: can't resolve `.note.GNU-stack' {.note.GNU-stack section} - `.Ltext0' {.text section} when running gcc with the -g flag. To work around this we unset CFLAGS when running the test. --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 634b66b..28e380b 100644 --- a/configure.ac +++ b/configure.ac @@ -823,6 +823,11 @@ AC_COMPILE_IFELSE( dnl *** check for GNU non-executable stack note support (ELF only) dnl (.section .note.GNU-stack,"",@progbits) +dnl This test doesn't work with "gcc -g" in gcc 4.4 (GHC trac #3889: +dnl Error: can't resolve `.note.GNU-stack' {.note.GNU-stack section} - `.Ltext0' {.text section} +dnl so we empty CFLAGS while running this test +CFLAGS2="$CFLAGS" +CFLAGS= AC_MSG_CHECKING(for GNU non-executable stack support) AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([__asm__ (".section .note.GNU-stack,\"\",@progbits");], [0])], @@ -831,6 +836,7 @@ AC_COMPILE_IFELSE( [Define to 1 if GNU non-executable stack notes are supported.]) ], [AC_MSG_RESULT(no)]) +CFLAGS="$CFLAGS2" dnl ** check for librt AC_CHECK_LIB(rt, clock_gettime) -- 1.7.10.4