Use general hardening flag toggle lists
The following parameters are now available:
* hardeningDisable
To disable specific hardening flags
* hardeningEnable
To enable specific hardening flags
Only the cc-wrapper supports this right now, but these may be reused by
other wrappers, builders or setup hooks.
cc-wrapper supports the following flags:
* fortify
* stackprotector
* pie (disabled by default)
* pic
* strictoverflow
* format
* relro
* bindnow
This commit is contained in:
@@ -95,8 +95,7 @@ stdenv.mkDerivation ({
|
||||
++ (optionals langVhdl [gnat])
|
||||
;
|
||||
|
||||
hardening_format = false;
|
||||
hardening_stackprotector = false;
|
||||
hardeningDisable = [ "format" "stackprotector" ];
|
||||
|
||||
configureFlags = "
|
||||
${if enableMultilib then "" else "--disable-multilib"}
|
||||
|
||||
@@ -103,7 +103,7 @@ stdenv.mkDerivation ({
|
||||
inherit langC langCC langFortran langJava langAda;
|
||||
};
|
||||
|
||||
hardening_format = false;
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
patches =
|
||||
[ ./pass-cxxcpp.patch
|
||||
|
||||
@@ -134,8 +134,7 @@ stdenv.mkDerivation ({
|
||||
inherit langC langCC langFortran langJava langAda;
|
||||
};
|
||||
|
||||
hardening_format = false;
|
||||
hardening_all = name != "gnat";
|
||||
hardeningDisable = [ "format" ] ++ optional (name != "gnat") "all";
|
||||
|
||||
patches =
|
||||
[ ]
|
||||
|
||||
@@ -189,7 +189,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit patches enableMultilib;
|
||||
|
||||
hardening_format = false;
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
postPatch =
|
||||
if (stdenv.isGNU
|
||||
|
||||
@@ -218,7 +218,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit patches;
|
||||
|
||||
hardening_format = false;
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
postPatch =
|
||||
if (stdenv.isGNU
|
||||
|
||||
@@ -220,9 +220,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
inherit patches;
|
||||
|
||||
# FIXME needs gcc 4.9 in bootstrap tools
|
||||
hardening_stackprotector = false;
|
||||
hardening_format = false;
|
||||
# FIXME stackprotector needs gcc 4.9 in bootstrap tools
|
||||
hardeningDisable = [ "format" "stackprotector" ];
|
||||
|
||||
postPatch =
|
||||
if (stdenv.isGNU
|
||||
|
||||
@@ -216,7 +216,7 @@ stdenv.mkDerivation ({
|
||||
sha256 = "1ny4smkp5bzs3cp8ss7pl6lk8yss0d9m4av1mvdp72r1x695akxq";
|
||||
};
|
||||
|
||||
hardening_format = false;
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
inherit patches;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user