add stackprotector support on musl32

In order to support stackprotector on musl32, this change import a
couple of patches from alpinelinux:
1. libssp_nonshared.a is built alongside musl's libc
2. the above library is automatically linked when compiling with gcc6
   or gcc7
This commit is contained in:
Walter Franzini
2021-02-12 21:11:16 +01:00
committed by Symphorien Gibol
parent eabb56ac6c
commit 733d24b50b
3 changed files with 31 additions and 1 deletions
+5 -1
View File
@@ -78,7 +78,11 @@ let majorVersion = "6";
++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch
# Obtain latest patch with ../update-mcfgthread-patches.sh
++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch;
++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch
++ optional (targetPlatform.libc == "musl" && targetPlatform.isx86_32) (fetchpatch {
url = "https://git.alpinelinux.org/aports/plain/main/gcc/gcc-6.1-musl-libssp.patch?id=5e4b96e23871ee28ef593b439f8c07ca7c7eb5bb";
sha256 = "1jf1ciz4gr49lwyh8knfhw6l5gvfkwzjy90m7qiwkcbsf4a3fqn2";
});
javaEcj = fetchurl {
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at