X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=toolchain%2Fgcc%2Fpatches%2F6.3.0%2F230-musl_libssp.patch;fp=toolchain%2Fgcc%2Fpatches%2F6.3.0%2F230-musl_libssp.patch;h=8dfd1fc28747b3aac286126c01bfce652d6e868f;hb=0a5ccfbadda79f4626202b78326c4d3ffccf9bd1;hp=0000000000000000000000000000000000000000;hpb=16725e2db0a4fbf72e05443049df3f0cfa2ad86b;p=openwrt%2Fstaging%2Fyousong.git diff --git a/toolchain/gcc/patches/6.3.0/230-musl_libssp.patch b/toolchain/gcc/patches/6.3.0/230-musl_libssp.patch new file mode 100644 index 0000000000..8dfd1fc287 --- /dev/null +++ b/toolchain/gcc/patches/6.3.0/230-musl_libssp.patch @@ -0,0 +1,13 @@ +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -858,7 +858,9 @@ proper position among the other output f + #endif + + #ifndef LINK_SSP_SPEC +-#ifdef TARGET_LIBC_PROVIDES_SSP ++#if DEFAULT_LIBC == LIBC_MUSL ++#define LINK_SSP_SPEC "-lssp_nonshared" ++#elif defined(TARGET_LIBC_PROVIDES_SSP) + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ + "|fstack-protector-strong|fstack-protector-explicit:}" + #else