Message ID | yddlhkwo62l.fsf@CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
On Wed, Jan 21, 2015 at 10:07:14AM +0100, Rainer Orth wrote: > Ok for mainline once that has been done? > > Thanks. > Rainer > > > 2015-01-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> > > * gcc.c (LINK_SSP_SPEC): Handle -fstack-protector-explicit. Ok. Though wonder if for the TARGET_LIBC_PROVIDES_SSP case LINK_SSP_SPEC shouldn't be #define LINK_SSP_SPEC "{fstack-protector|fstack-protector-strong|fstack-protector-explicit|fstack-protector-all:}" and gcc/config/freebsd.h: #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp_nonshared}" should be changed too (adding both -string and -explicit). > # HG changeset patch > # Parent 32ee1d2fb4ac6498d6363a1841482f8c9fa521d7 > Handle -fstack-protector-explicit in LINK_SSP_SPEC > > diff --git a/gcc/gcc.c b/gcc/gcc.c > --- a/gcc/gcc.c > +++ b/gcc/gcc.c > @@ -730,7 +730,7 @@ proper position among the other output f > #ifdef TARGET_LIBC_PROVIDES_SSP > #define LINK_SSP_SPEC "%{fstack-protector:}" > #else > -#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-strong|fstack-protector-all:-lssp_nonshared -lssp}" > +#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-strong|fstack-protector-explicit|fstack-protector-all:-lssp_nonshared -lssp}" > #endif > #endif > Jakub
On 01/22/15 05:37, Jakub Jelinek wrote: > On Wed, Jan 21, 2015 at 10:07:14AM +0100, Rainer Orth wrote: >> Ok for mainline once that has been done? >> >> Thanks. >> Rainer >> >> >> 2015-01-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> >> >> * gcc.c (LINK_SSP_SPEC): Handle -fstack-protector-explicit. > > Ok. > Though wonder if for the TARGET_LIBC_PROVIDES_SSP case LINK_SSP_SPEC > shouldn't be > #define LINK_SSP_SPEC "{fstack-protector|fstack-protector-strong|fstack-protector-explicit|fstack-protector-all:}" > and > gcc/config/freebsd.h: > #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp_nonshared}" > should be changed too (adding both -string and -explicit). Ranier, sorry about the breakage on Solaris. WRT other LINK_SPECs, yea, they all need to check the 4 variants of -fstack-protector-whatever and if any are found, link in libssp. Patch to fix that pre-approved. jeff
# HG changeset patch # Parent 32ee1d2fb4ac6498d6363a1841482f8c9fa521d7 Handle -fstack-protector-explicit in LINK_SSP_SPEC diff --git a/gcc/gcc.c b/gcc/gcc.c --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -730,7 +730,7 @@ proper position among the other output f #ifdef TARGET_LIBC_PROVIDES_SSP #define LINK_SSP_SPEC "%{fstack-protector:}" #else -#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-strong|fstack-protector-all:-lssp_nonshared -lssp}" +#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-strong|fstack-protector-explicit|fstack-protector-all:-lssp_nonshared -lssp}" #endif #endif