linux bootstrap for musl: kludgery

+7 -3
+1 -1
pkgs/stdenv/linux/bootstrap-tools-musl/default.nix
··· 14 14 # Needed by the GCC wrapper. 15 15 langC = true; 16 16 langCC = true; 17 - isGNU = false; 17 + isGNU = true; 18 18 }
+6 -2
pkgs/stdenv/linux/default.nix
··· 6 6 { lib 7 7 , localSystem, crossSystem, config, overlays 8 8 9 - , bootstrapFiles ? { # switch 9 + , bootstrapFiles ? if localSystem.libc == "musl" then import ./bootstrap-files/musl64.nix 10 + else { # switch 10 11 "i686-linux" = import ./bootstrap-files/i686.nix; 11 12 "x86_64-linux" = import ./bootstrap-files/x86_64.nix; 12 13 "armv5tel-linux" = import ./bootstrap-files/armv5tel.nix; ··· 40 41 41 42 42 43 # Download and unpack the bootstrap tools (coreutils, GCC, Glibc, ...). 43 - bootstrapTools = import ./bootstrap-tools { inherit system bootstrapFiles; }; 44 + bootstrapTools = import (if localSystem.libc == "musl" then ./bootstrap-tools-musl else ./bootstrap-tools) { inherit system bootstrapFiles; }; 44 45 45 46 46 47 # This function builds the various standard environments used during ··· 140 141 buildCommand = '' 141 142 mkdir -p $out 142 143 ln -s ${bootstrapTools}/lib $out/lib 144 + '' + lib.optionalString (localSystem.libc == "glibc") '' 143 145 ln -s ${bootstrapTools}/include-glibc $out/include 146 + '' + lib.optionalString (localSystem.libc == "musl") '' 147 + ln -s ${bootstrapTools}/include-libc $out/include 144 148 ''; 145 149 }; 146 150 gcc-unwrapped = bootstrapTools;