nix: force make to use old-style two-pipe-fds jobserver

gcc lto-wrapper uses the make jobserver to speed up linking, and it
doesn't support the new fifo:/path style of jobserver-auth yet. it'll
still work but use only one thread, so we should stick to the old style
for now.
This commit is contained in:
pennae
2023-02-09 14:51:24 +01:00
committed by Florian Brandes
parent 1fd16ccd45
commit 978703279a

View File

@@ -181,6 +181,10 @@ self = stdenv.mkDerivation {
];
makeFlags = [
# gcc runs multi-threaded LTO using make and does not yet detect the new fifo:/path style
# of make jobserver. until gcc adds support for this we have to instruct make to use this
# old style or LTO builds will run their linking on only one thread, which takes forever.
"--jobserver-style=pipe"
"profiledir=$(out)/etc/profile.d"
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "PRECOMPILE_HEADERS=0"
++ lib.optional (stdenv.hostPlatform.isDarwin) "PRECOMPILE_HEADERS=1";