]> code.ossystems Code Review - openembedded-core.git/commit
gcc: Link libssp_nonshared.a only on musl targets
authorKhem Raj <raj.khem@gmail.com>
Wed, 28 Jun 2017 02:11:44 +0000 (19:11 -0700)
committerMartin Jansa <Martin.Jansa@gmail.com>
Sun, 11 Mar 2018 00:25:06 +0000 (00:25 +0000)
commit27eaa97595cbac38a8bec118fe3d5f8920ab814e
tree1b3990212719cc4102698cb62fa54d453999f01d
parent5098e46cd7101bcc66dd579352292136b29d840b
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

Cherry-picked from oe-core master d71eba26850838b2878efea3f8c392a2eb2ebbfb

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
meta/recipes-devtools/gcc/gcc-6.3.inc
meta/recipes-devtools/gcc/gcc-6.3/0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch [new file with mode: 0644]
meta/recipes-devtools/gcc/gcc-6.3/0041-ssp_nonshared.patch [deleted file]