| b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | --- a/gcc/gcc.cc |
| 2 | +++ b/gcc/gcc.cc | ||||
| 3 | @@ -985,7 +985,9 @@ proper position among the other output f | ||||
| 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|fstack-protector-all" \ | ||||
| 12 | "|fstack-protector-strong|fstack-protector-explicit:}" | ||||
| 13 | #else | ||||