Merge pull request #50295 from matthewbauer/pie
Disable PIE hardening in more places
This commit is contained in:
commit
79faee180b
@ -177,7 +177,7 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
inherit patches;
|
inherit patches;
|
||||||
|
|
||||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
hardeningDisable = [ "format" "pie" ];
|
||||||
|
|
||||||
outputs = [ "out" "lib" "man" "info" ];
|
outputs = [ "out" "lib" "man" "info" ];
|
||||||
setOutputFlags = false;
|
setOutputFlags = false;
|
||||||
|
@ -185,7 +185,7 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
inherit patches;
|
inherit patches;
|
||||||
|
|
||||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
hardeningDisable = [ "format" "pie" ];
|
||||||
|
|
||||||
outputs = if langJava || langGo then ["out" "man" "info"]
|
outputs = if langJava || langGo then ["out" "man" "info"]
|
||||||
else [ "out" "lib" "man" "info" ];
|
else [ "out" "lib" "man" "info" ];
|
||||||
|
@ -178,7 +178,7 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
libc_dev = stdenv.cc.libc_dev;
|
libc_dev = stdenv.cc.libc_dev;
|
||||||
|
|
||||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
hardeningDisable = [ "format" "pie" ];
|
||||||
|
|
||||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||||
# insert into default search paths.
|
# insert into default search paths.
|
||||||
|
@ -178,7 +178,7 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
libc_dev = stdenv.cc.libc_dev;
|
libc_dev = stdenv.cc.libc_dev;
|
||||||
|
|
||||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
hardeningDisable = [ "format" "pie" ];
|
||||||
|
|
||||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||||
# insert into default search paths.
|
# insert into default search paths.
|
||||||
|
@ -149,7 +149,7 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
libc_dev = stdenv.cc.libc_dev;
|
libc_dev = stdenv.cc.libc_dev;
|
||||||
|
|
||||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
hardeningDisable = [ "format" "pie" ];
|
||||||
|
|
||||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||||
# insert into default search paths.
|
# insert into default search paths.
|
||||||
|
@ -143,7 +143,7 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
libc_dev = stdenv.cc.libc_dev;
|
libc_dev = stdenv.cc.libc_dev;
|
||||||
|
|
||||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
hardeningDisable = [ "format" "pie" ];
|
||||||
|
|
||||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||||
# insert into default search paths.
|
# insert into default search paths.
|
||||||
|
@ -137,7 +137,7 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
libc_dev = stdenv.cc.libc_dev;
|
libc_dev = stdenv.cc.libc_dev;
|
||||||
|
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" "pie" ];
|
||||||
|
|
||||||
postPatch =
|
postPatch =
|
||||||
if targetPlatform != hostPlatform || stdenv.cc.libc != null then
|
if targetPlatform != hostPlatform || stdenv.cc.libc != null then
|
||||||
|
@ -97,7 +97,7 @@ stdenv.mkDerivation rec {
|
|||||||
then "-Wno-string-plus-int -Wno-deprecated-declarations"
|
then "-Wno-string-plus-int -Wno-deprecated-declarations"
|
||||||
else "-static-libgcc";
|
else "-static-libgcc";
|
||||||
|
|
||||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
hardeningDisable = [ "format" "pie" ];
|
||||||
|
|
||||||
# TODO(@Ericson2314): Always pass "--target" and always targetPrefix.
|
# TODO(@Ericson2314): Always pass "--target" and always targetPrefix.
|
||||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target";
|
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target";
|
||||||
|
@ -42,7 +42,8 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1dzg45vgy2w1xcd3p6h8d76ykhabbvk1h0lf8yb24ikrwlv8cr4p";
|
sha256 = "1dzg45vgy2w1xcd3p6h8d76ykhabbvk1h0lf8yb24ikrwlv8cr4p";
|
||||||
};
|
};
|
||||||
|
|
||||||
hardeningDisable = [ "format" ] ++ lib.optionals enableStatic [ "fortify" ];
|
hardeningDisable = [ "format" "pie" ]
|
||||||
|
++ lib.optionals enableStatic [ "fortify" ];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./busybox-in-store.patch
|
./busybox-in-store.patch
|
||||||
|
@ -269,7 +269,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches
|
|||||||
++ optionals stdenv.lib.inNixShell [ pkgconfig ncurses ]
|
++ optionals stdenv.lib.inNixShell [ pkgconfig ncurses ]
|
||||||
;
|
;
|
||||||
|
|
||||||
hardeningDisable = [ "bindnow" "format" "fortify" "stackprotector" "pic" ];
|
hardeningDisable = [ "bindnow" "format" "fortify" "stackprotector" "pic" "pie" ];
|
||||||
|
|
||||||
# Absolute paths for compilers avoid any PATH-clobbering issues.
|
# Absolute paths for compilers avoid any PATH-clobbering issues.
|
||||||
makeFlags = commonMakeFlags ++ [
|
makeFlags = commonMakeFlags ++ [
|
||||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1ac20jws8iys9w6dpn4q3hihyx73zkabdwv3gcb779cxfrmq2k2h";
|
sha256 = "1ac20jws8iys9w6dpn4q3hihyx73zkabdwv3gcb779cxfrmq2k2h";
|
||||||
};
|
};
|
||||||
|
|
||||||
hardeningDisable = [ "format" "pic" "relro" ];
|
hardeningDisable = [ "format" "pic" "relro" "pie" ];
|
||||||
|
|
||||||
configureFlags = [ "BUILD_CC=${buildPackages.stdenv.cc.targetPrefix}cc" ];
|
configureFlags = [ "BUILD_CC=${buildPackages.stdenv.cc.targetPrefix}cc" ];
|
||||||
nativeBuildInputs = [ buildPackages.stdenv.cc ];
|
nativeBuildInputs = [ buildPackages.stdenv.cc ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user