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)
This commit is contained in:
parent
2f97911566
commit
2e2afa1943
@ -180,7 +180,7 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
inherit patches;
|
inherit patches;
|
||||||
|
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||||
|
|
||||||
outputs = [ "out" "lib" "man" "info" ];
|
outputs = [ "out" "lib" "man" "info" ];
|
||||||
setOutputFlags = false;
|
setOutputFlags = false;
|
||||||
|
@ -188,7 +188,7 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
inherit patches;
|
inherit patches;
|
||||||
|
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "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" ];
|
||||||
|
@ -181,7 +181,7 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
libc_dev = stdenv.cc.libc_dev;
|
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
|
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||||
# insert into default search paths.
|
# insert into default search paths.
|
||||||
|
@ -182,7 +182,7 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
libc_dev = stdenv.cc.libc_dev;
|
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
|
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||||
# insert into default search paths.
|
# insert into default search paths.
|
||||||
|
@ -151,7 +151,7 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
libc_dev = stdenv.cc.libc_dev;
|
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
|
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||||
# insert into default search paths.
|
# insert into default search paths.
|
||||||
|
@ -145,7 +145,7 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
libc_dev = stdenv.cc.libc_dev;
|
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
|
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||||
# insert into default search paths.
|
# insert into default search paths.
|
||||||
|
@ -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" ];
|
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "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";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user