diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix index d85e40bdc28a..f0032916db9d 100644 --- a/pkgs/tools/package-management/nix/common.nix +++ b/pkgs/tools/package-management/nix/common.nix @@ -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";