summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-7.1/0040-ssp_nonshared.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-06-27 19:11:44 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-08 13:34:45 +0100
commitdc3b3a8df3297367e9386dd3ac098b64f7f46d06 (patch)
tree554209a5ed207ee22c1506313e2f820fa84d52d4 /meta/recipes-devtools/gcc/gcc-7.1/0040-ssp_nonshared.patch
parentfb3be142ce224ba972e3217cf6938373c6f081b5 (diff)
downloadpoky-dc3b3a8df3297367e9386dd3ac098b64f7f46d06.tar.gz
gcc: Link libssp_nonshared.a only on musl targets
glibc already provides the content for libssp_nonshared in libc_nonshared.a therefore we dont need to make it universal. This also fixed build issues on glibc when linking statically and using -fstack-protector Fixed errors like /mnt/a/oe/build/tmp/work/i586-bec-linux/aufs-util/3.14+gitAUTOINC+bdfcc0dcfc-r0/recipe-sysroot/usr/lib/../lib/libc.a(stack_chk_fail.o): In function `__stack_chk_fail': /usr/src/debug/glibc/2.26-r0/git/debug/stack_chk_fail.c:27: multiple definition of `__stack_chk_fail_local' /mnt/a/oe/build/tmp/work/i586-bec-linux/aufs-util/3.14+gitAUTOINC+bdfcc0dcfc-r0/recipe-sysroot/usr/lib/../lib/libssp_nonshared.a(libssp_nonshared_la-ssp-local.o):/usr/src/debug/gcc-runtime/7.1.0-r0/gcc-7.1.0/build.i586-bec-linux.i586-bec-linux/i586-bec-linux/libssp/../../../../../../../../work-shared/gcc-7.1.0-r0/gcc-7.1.0/libssp/ssp-local.c:47: first defined here collect2: error: ld returned 1 exit status (From OE-Core rev: d71eba26850838b2878efea3f8c392a2eb2ebbfb) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-7.1/0040-ssp_nonshared.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.1/0040-ssp_nonshared.patch28
1 files changed, 0 insertions, 28 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-7.1/0040-ssp_nonshared.patch b/meta/recipes-devtools/gcc/gcc-7.1/0040-ssp_nonshared.patch
deleted file mode 100644
index e9fb35cb91..0000000000
--- a/meta/recipes-devtools/gcc/gcc-7.1/0040-ssp_nonshared.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From 6c98538411ac30c2262b2635547974c6cd1699c5 Mon Sep 17 00:00:00 2001
2From: Szabolcs Nagy <nsz@port70.net>
3Date: Sat, 7 Nov 2015 14:58:40 +0000
4Subject: [PATCH 40/47] ssp_nonshared
5
6---
7Upstream-Status: Inappropriate [OE-Specific]
8
9 gcc/gcc.c | 3 ++-
10 1 file changed, 2 insertions(+), 1 deletion(-)
11
12diff --git a/gcc/gcc.c b/gcc/gcc.c
13index 84af5d5a2e1..2c6471aa565 100644
14--- a/gcc/gcc.c
15+++ b/gcc/gcc.c
16@@ -872,7 +872,8 @@ proper position among the other output files. */
17 #ifndef LINK_SSP_SPEC
18 #ifdef TARGET_LIBC_PROVIDES_SSP
19 #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
20- "|fstack-protector-strong|fstack-protector-explicit:}"
21+ "|fstack-protector-strong|fstack-protector-explicit" \
22+ ":-lssp_nonshared}"
23 #else
24 #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
25 "|fstack-protector-strong|fstack-protector-explicit" \
26--
272.12.2
28