aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/gcc-6.1-musl-libssp.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-07-06 07:35:14 +0000
committerTimo Teräs <timo.teras@iki.fi>2016-07-06 07:35:14 +0000
commitd307f133de1f8a9993ab0d6fd51176b9373df4c3 (patch)
tree86d9dc30b14fca7e3ee8084ce7c68db3ef573d44 /main/gcc/gcc-6.1-musl-libssp.patch
parent1830e485126ea9a95d763317fb0c508c1ff297d2 (diff)
downloadaports-d307f133de1f8a9993ab0d6fd51176b9373df4c3.tar.bz2
aports-d307f133de1f8a9993ab0d6fd51176b9373df4c3.tar.xz
main/gcc: restore original ssp nonshared patch
fixes x86 build
Diffstat (limited to 'main/gcc/gcc-6.1-musl-libssp.patch')
-rw-r--r--main/gcc/gcc-6.1-musl-libssp.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/main/gcc/gcc-6.1-musl-libssp.patch b/main/gcc/gcc-6.1-musl-libssp.patch
new file mode 100644
index 0000000000..fe5c61434d
--- /dev/null
+++ b/main/gcc/gcc-6.1-musl-libssp.patch
@@ -0,0 +1,20 @@
+Author: Timo Teräs <timo.teras@iki.fi>
+
+Alpine musl package provides libssp_nonshared.a. We link to it unconditionally,
+as otherwise we get link failures if some objects are -fstack-protector built
+and final link happens with -fno-stack-protector. This seems to be the common
+case when bootstrapping gcc, the piepatches do not seem to fully fix the
+crosstoolchain and bootstrap sequence wrt. stack-protector flag usage.
+
+--- gcc-6.1.0/gcc/gcc.c.orig
++++ gcc-6.1.0/gcc/gcc.c
+@@ -870,8 +870,7 @@
+
+ #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" \