This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] gcc fstack-protector-explicit
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- Cc: Jeff Law <law at redhat dot com>, Daniel Gutson <daniel dot gutson at tallertechnologies dot com>, Marcos Díaz <marcos dot diaz at tallertechnologies dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 22 Jan 2015 13:37:20 +0100
- Subject: Re: [patch] gcc fstack-protector-explicit
- Authentication-results: sourceware.org; auth=none
- References: <CAEOtcjmFhFJ8A4r3nLq_odtFSctT51TOma0douMdBb27uKNnVA at mail dot gmail dot com> <528AFE96 dot 3040301 at redhat dot com> <CAEOtcjkX9yk5DXQbrKqxncpZJ0zvVdHq44jpL+6Bub9mH_t=DA at mail dot gmail dot com> <528D09D9 dot 9020902 at redhat dot com> <CAEOtcj=sXsqMOZw6Kas2iK=e6qRh5u+hmwB=-tmqAoWZL==5Dg at mail dot gmail dot com> <53B2EEEC dot 9030003 at redhat dot com> <CAF5HaEXvVgiGc3mexA5HL6ot5j7xObfNtqOgOsui6vTEZV5hGQ at mail dot gmail dot com> <54B75073 dot 4020501 at redhat dot com> <yddlhkwo62l dot fsf at CeBiTec dot Uni-Bielefeld dot DE>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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