diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.nix b/pkgs/stdenv/linux/make-bootstrap-tools.nix index ce81ff0bd8f..6358855464b 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools.nix @@ -1,6 +1,8 @@ +{system ? builtins.currentSystem}: + let - pkgs = import ../../top-level/all-packages.nix {}; + pkgs = import ../../top-level/all-packages.nix {inherit system;}; # Have to do removeAttrs to prevent all-packages from copying @@ -37,14 +39,14 @@ let gnutar = # Tar seems to be broken on dietlibc on x86_64. - if pkgs.stdenv.system != "x86_64-linux" + if system != "x86_64-linux" then pkgsDiet.gnutar151 # 1.16 is broken else pkgsStatic.gnutar; gawk = # Dietlibc only provides sufficient math functions (fmod, sin, # cos, etc.) on i686. On other platforms, use Glibc. - if pkgs.stdenv.system == "i686-linux" + if system == "i686-linux" then pkgsDiet.gawk else pkgsStatic.gawk; diff --git a/pkgs/stdenv/linux/make-bootstrap-tools.sh b/pkgs/stdenv/linux/make-bootstrap-tools.sh index 1b848c06fb8..0ec0435fce9 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools.sh +++ b/pkgs/stdenv/linux/make-bootstrap-tools.sh @@ -88,7 +88,6 @@ cp -prd $gcc/libexec gcc chmod -R +w gcc nukeRefs gcc/libexec/gcc/*/*/cc1 nukeRefs gcc/libexec/gcc/*/*/collect2 -rm -f gcc/lib/libmud* gcc/lib/libiberty* gcc/lib/libssp* if test -e gcc/lib/libgcc_s.so.1; then nukeRefs gcc/lib/libgcc_s.so.1 fi @@ -97,10 +96,10 @@ if test -e $gcc/lib64; then chmod -R +w gcc/lib64 nukeRefs gcc/lib64/libgcc_s.so.1 fi +rm -f gcc/lib*/libmud* gcc/lib*/libiberty* gcc/lib*/libssp* gcc/lib*/libgomp* rm -rf gcc/lib/gcc/*/*/install-tools rm -rf gcc/lib/gcc/*/*/include/root rm -rf gcc/lib/gcc/*/*/include/linux -rm -f gcc/lib/libgomp* if test -e gcc/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/bits/mathdef.h; then nukeRefs gcc/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include/bits/mathdef.h fi