summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc/6/default.nix
diff options
context:
space:
mode:
authorWalter Franzini <walter.franzini@gmail.com>2019-08-23 10:47:39 +0200
committerSymphorien Gibol <symphorien+git@xlumurb.eu>2021-02-12 21:11:16 +0100
commit733d24b50b63cef38c9d228e127c9d09865afc16 (patch)
treea17bca832686fc984b7f068214cf55b574f9d24e /pkgs/development/compilers/gcc/6/default.nix
parenteabb56ac6c2458796714be527a790ca23de66f38 (diff)
downloadnixpkgs-733d24b50b63cef38c9d228e127c9d09865afc16.tar
nixpkgs-733d24b50b63cef38c9d228e127c9d09865afc16.tar.gz
nixpkgs-733d24b50b63cef38c9d228e127c9d09865afc16.tar.bz2
nixpkgs-733d24b50b63cef38c9d228e127c9d09865afc16.tar.lz
nixpkgs-733d24b50b63cef38c9d228e127c9d09865afc16.tar.xz
nixpkgs-733d24b50b63cef38c9d228e127c9d09865afc16.tar.zst
nixpkgs-733d24b50b63cef38c9d228e127c9d09865afc16.zip
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
Diffstat (limited to 'pkgs/development/compilers/gcc/6/default.nix')
-rw-r--r--pkgs/development/compilers/gcc/6/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix
index fa7881e398a..93c9dde61fc 100644
--- a/pkgs/development/compilers/gcc/6/default.nix
+++ b/pkgs/development/compilers/gcc/6/default.nix
@@ -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