[Optimization+Overlays] More recent GCC-GO and faster fastStdenv

This commit is contained in:
Antoine Viallon 2022-10-08 20:42:14 +02:00
parent 3dc95db22e
commit 043ed14890
Signed by: aviallon
GPG key ID: 186FC35EDEB25716
2 changed files with 24 additions and 0 deletions

View file

@ -62,6 +62,21 @@ in
config = mkIf cfg.enable {
nixpkgs.overlays = mkBefore [
(self: super: {
fastStdenv = super.overrideCC super.gccStdenv (super.buildPackages.gcc_latest.overrideAttrs (old:
let
ccAttrs = cc: cc.overrideAttrs (oldAttrs: {
configureFlags = (oldAttrs.configureFlags or []) ++ [ "--with-cpu-64=${generalCfg.cpuArch}" "--with-arch-64=${generalCfg.cpuTune}" ];
});
ccOverrides = cc: cc.override {
reproducibleBuild = false;
};
in {
cc = ccOverrides (ccAttrs old.cc);
}
));
})
(self: super: {
opensshOptimized = optimizePkg { level = "very-unsafe"; lto = true; } super.openssh;
#libxslt = optimizePkg { level = "unsafe"; parallelize = generalCfg.cores; lto = true; } super.libxslt;