summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-runtime.inc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-04-13 22:39:07 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-09 10:47:50 +0100
commitde109820c3c393bb3f2b06ccf564a9b05b4872aa (patch)
tree8a9494921924c926cbbfed476b5c7d02a20cd32e /meta/recipes-devtools/gcc/gcc-runtime.inc
parent8b5c4fea90b1d043dc9b8cbadbc4d9b48b5944cc (diff)
downloadpoky-de109820c3c393bb3f2b06ccf564a9b05b4872aa.tar.gz
gcc-runtime: Disable gcc version of libssp
libssp is implemented fully in glibc as well as in musl so we really do not need the gcc version of this library except may be for mingw, where we keep it enabled anyway gcc in OE is built with the knowledge that C library already provides libssp implementation, we should therefore not need the gcc implementation of same. libssp_nonshared piece is a detail which is needed when gcc is the compiler, in glibc this is part of libc_nonshared.a already and libc_nonshared.a is linked always when linking with -lc becuase libc.so in glibc is actually a linker script GROUP ( /usr/lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /usr/lib/ld-linux-x86-64.so.2 ) ) which automatically links in the needed runtime bits, this however is not the case for musl, where core SSP APIs are implemented in full but compiler specific runtime isn't, for this we add a new package called libssp_nonshared which generate the needed runtime stub and gcc is already carrying patch to link to libssp_nonshared.a on musl This should fix a long standing problem where static PIE executable were not buildable with OE since it was conflicting SSP implementation one from C library and the other one from gcc and we end up with duplicate symbol errors during linking. Backport a patch from trunk which enhances enable|disable-libssp to not only disable building libssp but also not emit the gcc specs to use it for subsequent linking when stack-protector options are used on compiler cmdline (From OE-Core rev: 6c14f99936f8c8c9b9d9f40a6b0c69675ea9a566) 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-runtime.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 7629fa56ff..72b8081cd3 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -22,8 +22,10 @@ RUNTIMELIBITM_nios2 = ""
22RUNTIMELIBITM_microblaze = "" 22RUNTIMELIBITM_microblaze = ""
23RUNTIMELIBITM_riscv32 = "" 23RUNTIMELIBITM_riscv32 = ""
24RUNTIMELIBITM_riscv64 = "" 24RUNTIMELIBITM_riscv64 = ""
25RUNTIMELIBSSP ?= ""
26RUNTIMELIBSSP_mingw32 ?= "libssp"
25 27
26RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \ 28RUNTIMETARGET = "${RUNTIMELIBSSP} libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \
27 ${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \ 29 ${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \
28" 30"
29RUNTIMETARGET_append_x86 = " libmpx" 31RUNTIMETARGET_append_x86 = " libmpx"