X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=aclocal.m4;h=747d064f2ad9c0be5b97593b3d56448940c2a384;hb=aecb51e1bbecef1872f9a3bb11856f39fa291f15;hp=53bd165bec50facecef493a0d1a45c3bc4a30cff;hpb=30fad70245d9ddfae0b781460bc51468a01f92f6;p=ghc-hetmet.git diff --git a/aclocal.m4 b/aclocal.m4 index 53bd165..747d064 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -141,7 +141,7 @@ AC_DEFUN([FP_COMPUTE_INT], # A variation of AC_CHECK_SIZEOF for computing the alignment restrictions of a # given type. Defines ALIGNMENT_TYPE. AC_DEFUN([FP_CHECK_ALIGNMENT], -[AS_LITERAL_IF([$1], [], +[AS_LITERAL_IF(m4_translit([[$1]], [*], [p]), [], [AC_FATAL([$0: requires literal arguments])])[]dnl AC_CHECK_TYPE([$1], [], [], [$3])[]dnl m4_pushdef([fp_Cache], [AS_TR_SH([fp_cv_alignment_$1])])[]dnl @@ -962,6 +962,9 @@ AC_SUBST([GhcPkgCmd]) # reordering things in the module and confusing the manger and/or splitter. # (eg. Trac #1427) # +# If gcc knows about the stack protector, turn it off. +# Otherwise the stack-smash handler gets triggered. +# AC_DEFUN([FP_GCC_EXTRA_FLAGS], [AC_REQUIRE([FP_HAVE_GCC]) AC_CACHE_CHECK([for extra options to pass gcc when compiling via C], [fp_cv_gcc_extra_opts], @@ -987,6 +990,12 @@ AC_CACHE_CHECK([for extra options to pass gcc when compiling via C], [fp_cv_gcc_ []) ;; esac + echo 'int main(void) {return 0;}' > conftest.c + if $CC -c conftest.c -fno-stack-protector > /dev/null 2>&1 + then + fp_cv_gcc_extra_opts="$fp_cv_gcc_extra_opts -fno-stack-protector" + fi + rm conftest.c conftest.o ]) AC_SUBST([GccExtraViaCOpts],$fp_cv_gcc_extra_opts) ])