Skip to content

Commit

Permalink
top-level: Only get rid of target-observing overrides when cross-comp…
Browse files Browse the repository at this point in the history
…iling

Previously, all overrides from the final native stage were chucked. This is
sound but caused unnecessary rebuilds. It would be tempting to just keep
all overrides, but then pkgs like gcc and binutils would not target the
correct platform--they would still target the (native) build platform. Now,
each native final stage responsibly just overrides such packages of the
target platform is that used to build the overriding packages.
  • Loading branch information
Ericson2314 committed Feb 8, 2017
1 parent 08a1855 commit e63cd62
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkgs/stdenv/linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,12 @@ in

overrides = self: super: {
inherit (prevStage)
gcc-unwrapped
gzip bzip2 xz bash binutils coreutils diffutils findutils gawk
gzip bzip2 xz bash coreutils diffutils findutils gawk
glibc gnumake gnused gnutar gnugrep gnupatch patchelf
attr acl paxctl zlib pcre;
} // lib.optionalAttrs (super.targetPlatform == localSystem) {
# Need to get rid of these when cross-compiling.
inherit (prevStage) binutils gcc-unwrapped;
};
};
})
Expand Down

0 comments on commit e63cd62

Please sign in to comment.