[commit: ghc] master: aclocal.m4: drop obsolete -fno-stack-protector (29ecb52)

git at git.haskell.org git at git.haskell.org
Thu Dec 27 17:01:09 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/29ecb52033b951e09b6141aeb92460db2f4c3183/ghc

>---------------------------------------------------------------

commit 29ecb52033b951e09b6141aeb92460db2f4c3183
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date:   Wed Dec 19 23:21:28 2018 +0000

    aclocal.m4: drop obsolete -fno-stack-protector
    
    Summary:
    Initially -fno-stack-protector was added for openbsd specifically for ghc-6.5:
        changeset:f638fdfe1d9de1307355c8074fbff9c28342c0ef (2006)
    and later it was extended to cover osx:
        changeset:c2cd83e7d85c11e6a33e1cde263eb2312566d535 (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: Sergei Trofimovich <slyfox at gentoo.org>
    
    Test Plan: validated on OpenBSD
    
    Reviewers: bgamari
    
    Subscribers: rwbarton, erikd, carter
    
    GHC Trac Issues: #16046
    
    Differential Revision: https://phabricator.haskell.org/D5465


>---------------------------------------------------------------

29ecb52033b951e09b6141aeb92460db2f4c3183
 aclocal.m4 | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 7aa3fb4..03f43d1 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -693,15 +693,6 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS],
 
     esac
 
-    # 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
-    then
-        $2="$$2 -fno-stack-protector"
-    fi
-
-    rm -f conftest.c conftest.o
     AC_MSG_RESULT([done])
 ])
 



More information about the ghc-commits mailing list