gcc/musl: rework SSP-support
[openwrt/openwrt.git] / toolchain / gcc / patches / 4.8-linaro / 230-musl_libssp.patch
1 --- gcc-4.8.1/gcc/gcc.c.orig 2013-09-24 06:27:32.133894539 +0000
2 +++ gcc-4.8.1/gcc/gcc.c 2013-09-24 06:29:35.790562854 +0000
3 @@ -656,7 +656,9 @@
4 #endif
5
6 #ifndef LINK_SSP_SPEC
7 -#ifdef TARGET_LIBC_PROVIDES_SSP
8 +#if DEFAULT_LIBC == LIBC_MUSL
9 +#define LINK_SSP_SPEC "-lssp_nonshared"
10 +#elif defined(TARGET_LIBC_PROVIDES_SSP)
11 #define LINK_SSP_SPEC "%{fstack-protector:}"
12 #else
13 #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}"