about summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-11-08 15:34:40 -0600
committerMatthew Bauer <mjbauer95@gmail.com>2018-11-09 13:55:35 -0600
commit2e2afa1943a69cef6abb96a8552ddafd06f9bbd4 (patch)
tree3dca406af50fb6700fdbf27815d3569d782d8656 /pkgs/development/compilers/gcc
parent2f97911566ef7f30769e2069f1d21345c219da49 (diff)
downloadnixlib-2e2afa1943a69cef6abb96a8552ddafd06f9bbd4.tar
nixlib-2e2afa1943a69cef6abb96a8552ddafd06f9bbd4.tar.gz
nixlib-2e2afa1943a69cef6abb96a8552ddafd06f9bbd4.tar.bz2
nixlib-2e2afa1943a69cef6abb96a8552ddafd06f9bbd4.tar.lz
nixlib-2e2afa1943a69cef6abb96a8552ddafd06f9bbd4.tar.xz
nixlib-2e2afa1943a69cef6abb96a8552ddafd06f9bbd4.tar.zst
nixlib-2e2afa1943a69cef6abb96a8552ddafd06f9bbd4.zip
gcc/binutils: disable pie hardening
These don’t like having -fPIE set for them. We should disable
hardening all the time, but in the interest of not changing hashes,
this only disables it for Musl (where it is now the default).

(cherry picked from commit a3a6884649354a660326acd68c1bd08ffd2dcfa2)
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r--pkgs/development/compilers/gcc/4.8/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/4.9/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/5/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/6/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/7/default.nix2
-rw-r--r--pkgs/development/compilers/gcc/8/default.nix2
6 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix
index e585f296e877..e40994a078e3 100644
--- a/pkgs/development/compilers/gcc/4.8/default.nix
+++ b/pkgs/development/compilers/gcc/4.8/default.nix
@@ -180,7 +180,7 @@ stdenv.mkDerivation ({
 
   inherit patches;
 
-  hardeningDisable = [ "format" ];
+  hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
 
   outputs = [ "out" "lib" "man" "info" ];
   setOutputFlags = false;
diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix
index 9dae061ecbb3..bd5257b94a09 100644
--- a/pkgs/development/compilers/gcc/4.9/default.nix
+++ b/pkgs/development/compilers/gcc/4.9/default.nix
@@ -188,7 +188,7 @@ stdenv.mkDerivation ({
 
   inherit patches;
 
-  hardeningDisable = [ "format" ];
+  hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
 
   outputs = if langJava || langGo then ["out" "man" "info"]
     else [ "out" "lib" "man" "info" ];
diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix
index fbc192752c72..85b3d96e1368 100644
--- a/pkgs/development/compilers/gcc/5/default.nix
+++ b/pkgs/development/compilers/gcc/5/default.nix
@@ -181,7 +181,7 @@ stdenv.mkDerivation ({
 
   libc_dev = stdenv.cc.libc_dev;
 
-  hardeningDisable = [ "format" ];
+  hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
 
   # This should kill all the stdinc frameworks that gcc and friends like to
   # insert into default search paths.
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix
index 793752dee19e..98e24900b01f 100644
--- a/pkgs/development/compilers/gcc/6/default.nix
+++ b/pkgs/development/compilers/gcc/6/default.nix
@@ -182,7 +182,7 @@ stdenv.mkDerivation ({
 
   libc_dev = stdenv.cc.libc_dev;
 
-  hardeningDisable = [ "format" ];
+  hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
 
   # This should kill all the stdinc frameworks that gcc and friends like to
   # insert into default search paths.
diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix
index c75a6c6e68f8..064d9eb6bc7b 100644
--- a/pkgs/development/compilers/gcc/7/default.nix
+++ b/pkgs/development/compilers/gcc/7/default.nix
@@ -151,7 +151,7 @@ stdenv.mkDerivation ({
 
   libc_dev = stdenv.cc.libc_dev;
 
-  hardeningDisable = [ "format" ];
+  hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
 
   # This should kill all the stdinc frameworks that gcc and friends like to
   # insert into default search paths.
diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix
index bcac577712aa..c6fea70cfbb7 100644
--- a/pkgs/development/compilers/gcc/8/default.nix
+++ b/pkgs/development/compilers/gcc/8/default.nix
@@ -145,7 +145,7 @@ stdenv.mkDerivation ({
 
   libc_dev = stdenv.cc.libc_dev;
 
-  hardeningDisable = [ "format" ];
+  hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
 
   # This should kill all the stdinc frameworks that gcc and friends like to
   # insert into default search paths.