lede/toolchain/gcc/patches-12.x/230-musl_libssp.patch
coolsnowwolf 92bdfb61ce Revert "Revert "toolchain: gcc: improve patch handling by introducing major version""
This reverts commit 779ed7d9a00d8a58e204b9a6e90e035f8c56b8ab.
2022-10-24 14:29:05 +08:00

14 lines
413 B
Diff

--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -985,7 +985,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