Commit 29ecb520 authored by Sergei Trofimovich's avatar Sergei Trofimovich Committed by Ben Gamari

aclocal.m4: drop obsolete -fno-stack-protector

Initially -fno-stack-protector was added for openbsd specifically for ghc-6.5:
    changeset:f638fdfe (2006)
and later it was extended to cover osx:
    changeset:c2cd83e7 (2009)

None of the reports hint at exact breakage. I guess both happened
in -fvia-C mode where GHC's Evil Mangler had a chance to mangle
stack canaries generated by fstack-protector.

ghc has no evil mangler anymore and the change is not needed
at least for C codegen.

validated the patch on OpenBSD-6.4. No new failures compared to
clean master branch.
Signed-off-by: default avatarSergei Trofimovich <>

Test Plan: validated on OpenBSD

Reviewers: bgamari

Subscribers: rwbarton, erikd, carter

GHC Trac Issues: #16046

Differential Revision:
parent 942b5019
......@@ -693,15 +693,6 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS],
# If gcc knows about the stack protector, turn it off.
# Otherwise the stack-smash handler gets triggered.
echo 'int main(void) {return 0;}' > conftest.c
if $CC -c conftest.c -fno-stack-protector > /dev/null 2>&1
$2="$$2 -fno-stack-protector"
rm -f conftest.c conftest.o
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment