diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-02-02 10:32:49 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-07 17:29:44 +0000 |
commit | 77fb841f2e747dc7fb5e9234d870a7a32a74d09b (patch) | |
tree | 2dc5451a7c2f67d8d4f3d23556eff933a7d59637 /meta/recipes-devtools/gcc/gcc-5.3/0048-ssp_nonshared.patch | |
parent | 07fa4783566d22d46ce719a621eee5404932dbbe (diff) | |
download | openembedded-core-77fb841f2e747dc7fb5e9234d870a7a32a74d09b.tar.gz openembedded-core-77fb841f2e747dc7fb5e9234d870a7a32a74d09b.tar.bz2 openembedded-core-77fb841f2e747dc7fb5e9234d870a7a32a74d09b.zip |
gcc: Fix build on musl with -fstack-protector
When enabling the secutity flags on musl based targets the builds fail
due to libssp(gcc-runtime) build asking to link with libssp and
libssp_nonshared.a when configuring libssp itself. This does not work
with musl since it does provide ssp implementation but not like glibc
where these libraries are separate to libc
Fix the nios2 patch with upstream status while at it and generate the
patch after applying to my tree
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-5.3/0048-ssp_nonshared.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-5.3/0048-ssp_nonshared.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-5.3/0048-ssp_nonshared.patch b/meta/recipes-devtools/gcc/gcc-5.3/0048-ssp_nonshared.patch new file mode 100644 index 0000000000..5ddd40a4aa --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-5.3/0048-ssp_nonshared.patch @@ -0,0 +1,29 @@ +From 3cb6013cf287ed9b1247ea37541e64b9810a121d Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy <nsz@port70.net> +Date: Sat, 7 Nov 2015 14:58:40 +0000 +Subject: [PATCH 48/48] ssp_nonshared + +--- +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending + + gcc/gcc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 8f53aea..3ddc658 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -732,7 +732,8 @@ proper position among the other output files. */ + #ifndef LINK_SSP_SPEC + #ifdef TARGET_LIBC_PROVIDES_SSP + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ +- "|fstack-protector-strong|fstack-protector-explicit:}" ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" + #else + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ + "|fstack-protector-strong|fstack-protector-explicit" \ +-- +2.7.0 + |