summaryrefslogtreecommitdiff
path: root/repo/gcc/0042-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
diff options
context:
space:
mode:
Diffstat (limited to 'repo/gcc/0042-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch')
-rw-r--r--repo/gcc/0042-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/repo/gcc/0042-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch b/repo/gcc/0042-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
new file mode 100644
index 0000000..96deb51
--- /dev/null
+++ b/repo/gcc/0042-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
@@ -0,0 +1,21 @@
+From: Alpine Linux community
+From: Olsken (updated patches)
+Date: Sat, 21 Aug 2021 08:51:52 +0000
+
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index bc1bd1686..b5c83977f 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1005,6 +1005,12 @@ proper position among the other output files. */
+ #define NO_SSP_SPEC ""
+ #endif
+
++#ifdef ENABLE_DEFAULT_SSP
++#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} "
++#else
++#define NO_SSP_SPEC ""
++#endif
++
+ #ifndef LINK_SSP_SPEC
+ #ifdef TARGET_LIBC_PROVIDES_SSP
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \