diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index 32dca269cab6..09044f3684a1 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -25,14 +25,18 @@ let builder = ./make-bootstrap-tools.sh; inherit (pkgsDiet) - coreutils findutils diffutils gnugrep - gzip bzip2 gnumake bash patch binutils; + gnugrep gzip bzip2 gnumake bash patch binutils; gnused = pkgsDiet.gnused412; # 4.1.5 gives "Memory exhausted" errors # patchelf is C++, won't work with dietlibc. inherit (pkgsStatic) patchelf; + # Coreutils won't build on dietlibc on x86_64 (and by extension, + # findutils and diffutils). + inherit (if pkgs.stdenv.system == "powerpc-linux" then pkgsStatic else pkgsDiet) + coreutils findutils diffutils; + gnutar = # Tar seems to be broken on dietlibc on x86_64. if pkgs.stdenv.system == "i686-linux" diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.sh b/pkgs/stdenv/linux/make-bootstrap-tools.sh index 838c507d575a..aa5395454890 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.sh +++ b/pkgs/stdenv/linux/make-bootstrap-tools.sh @@ -26,6 +26,10 @@ cp $coreutils/bin/cp $out/in-nixpkgs cp $gnutar/bin/tar $out/in-nixpkgs nukeRefs $out/in-nixpkgs/tar +if test "$system" = "powerpc-linux"; then + nukeRefs $out/in-nixpkgs/cp +fi + # Create the tools tarball. mkdir tools @@ -58,6 +62,12 @@ nukeRefs tools/bin/grep nukeRefs tools/bin/patchelf nukeRefs tools/bin/make +if test "$system" = "powerpc-linux"; then + for i in tools/bin/*; do + nukeRefs $i + done +fi + # Create the binutils tarball. mkdir binutils