diff options
author | Ian Lynagh <igloo@earth.li> | 2011-10-19 17:33:25 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-10-19 17:33:25 +0100 |
commit | 7dd60dddc194cd2f32d3685f396e8d09fcb2ce42 (patch) | |
tree | f090e210e5bb0c6b2845599716e8194d95f48ba2 /aclocal.m4 | |
parent | 723929bcee68add69f866f42dc3a610e6db638d0 (diff) | |
download | haskell-7dd60dddc194cd2f32d3685f396e8d09fcb2ce42.tar.gz |
Convert the HAVE_GNU_NONEXEC_STACK conditional into Haskell
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 674ba16d56..f18e17fcca 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -239,6 +239,23 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS], [HaskellHaveSubsectionsViaSymbols=False AC_MSG_RESULT(no)]) + 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])], + [AC_MSG_RESULT(yes) + HaskellHaveGnuNonexecStack=True], + [AC_MSG_RESULT(no) + HaskellHaveGnuNonexecStack=False]) + CFLAGS="$CFLAGS2" + checkArch "$BuildArch" "" checkVendor "$BuildVendor" checkOS "$BuildOS" "" @@ -254,6 +271,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS], AC_SUBST(HaskellTargetArch) AC_SUBST(HaskellTargetOs) AC_SUBST(HaskellHaveSubsectionsViaSymbols) + AC_SUBST(HaskellHaveGnuNonexecStack) ]) |