diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-09-11 21:19:07 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-09-11 21:30:41 -0400 |
commit | 7a82ace00e3cf19205df455cc1ec8a444d99d79d (patch) | |
tree | bf973c23519490c1fbfa0e84561398838b1834dd /Configure | |
parent | 61cd60c6c5ee318dd200a61898201288b3c1958b (diff) | |
download | perl-7a82ace00e3cf19205df455cc1ec8a444d99d79d.tar.gz |
Use -fstack-protector-strong, if available.
In preference to just -fstack-protector. gcc 4.8.x? gcc 4.9, definitely.
(FWIW, users include at least Google Chrome, Fedora 20, Ubuntu)
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -5384,8 +5384,15 @@ default|recommended) # as that way the compiler can do the right implementation dependant # thing. (NWC) case "$gccversion" in - ?*) set stack-protector -fstack-protector + ?*) set stack-protector-strong -fstack-protector-strong eval $checkccflag + case "$dflt" in + *-fstack-protector-strong*) ;; # It got added. + *) # Try the plain/older -fstack-protector. + set stack-protector -fstack-protector + eval $checkccflag + ;; + esac ;; esac ;; @@ -5528,6 +5535,12 @@ case "$ldflags" in esac # See note above about -fstack-protector case "$ccflags" in +*-fstack-protector-strong*) + case "$dflt" in + *-fstack-protector-strong*) ;; # Don't add it again + *) dflt="$dflt -fstack-protector-strong" ;; + esac + ;; *-fstack-protector*) case "$dflt" in *-fstack-protector*) ;; # Don't add it again @@ -8399,6 +8412,12 @@ EOM esac case "$ldflags" in + *-fstack-protector-strong*) + case "$dflt" in + *-fstack-protector-strong*) ;; # Don't add it again + *) dflt="$dflt -fstack-protector-strong" ;; + esac + ;; *-fstack-protector*) case "$dflt" in *-fstack-protector*) ;; # Don't add it again |