First part taken from Alpine. Second part added to prevent gccgo from thinking it can -fsplit-stack on musl. --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -876,9 +876,8 @@ #endif #ifndef LINK_SSP_SPEC #ifdef TARGET_LIBC_PROVIDES_SSP -#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" +#define LINK_SSP_SPEC "-lssp_nonshared" #else #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ "|fstack-protector-strong|fstack-protector-explicit" \ --- a/gcc/config/i386/gnu-user-common.h +++ b/gcc/config/i386/gnu-user-common.h @@ -64,9 +64,3 @@ along with GCC; see the file COPYING3. If not see /* Static stack checking is supported by means of probes. */ #define STACK_CHECK_STATIC_BUILTIN 1 - -/* We only build the -fsplit-stack support in libgcc if the - assembler has full support for the CFI directives. */ -#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE -#define TARGET_CAN_SPLIT_STACK -#endif --- a/gcc/config/i386/gnu.h +++ b/gcc/config/i386/gnu.h @@ -40,11 +40,6 @@ along with GCC. If not, see . /* i386 glibc provides __stack_chk_guard in %gs:0x14. */ #define TARGET_THREAD_SSP_OFFSET 0x14 -/* We only build the -fsplit-stack support in libgcc if the - assembler has full support for the CFI directives. */ -#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE -#define TARGET_CAN_SPLIT_STACK -#endif /* We steal the last transactional memory word. */ #define TARGET_THREAD_SPLIT_STACK_OFFSET 0x30 #endif