linux bootstrap for musl: kludgery
This commit is contained in:
parent
e4d5928ba3
commit
3ee5094934
@ -14,5 +14,5 @@ derivation {
|
||||
# Needed by the GCC wrapper.
|
||||
langC = true;
|
||||
langCC = true;
|
||||
isGNU = false;
|
||||
isGNU = true;
|
||||
}
|
||||
|
@ -6,7 +6,8 @@
|
||||
{ lib
|
||||
, localSystem, crossSystem, config, overlays
|
||||
|
||||
, bootstrapFiles ? { # switch
|
||||
, bootstrapFiles ? if localSystem.libc == "musl" then import ./bootstrap-files/musl64.nix
|
||||
else { # switch
|
||||
"i686-linux" = import ./bootstrap-files/i686.nix;
|
||||
"x86_64-linux" = import ./bootstrap-files/x86_64.nix;
|
||||
"armv5tel-linux" = import ./bootstrap-files/armv5tel.nix;
|
||||
@ -40,7 +41,7 @@ let
|
||||
|
||||
|
||||
# Download and unpack the bootstrap tools (coreutils, GCC, Glibc, ...).
|
||||
bootstrapTools = import ./bootstrap-tools { inherit system bootstrapFiles; };
|
||||
bootstrapTools = import (if localSystem.libc == "musl" then ./bootstrap-tools-musl else ./bootstrap-tools) { inherit system bootstrapFiles; };
|
||||
|
||||
|
||||
# This function builds the various standard environments used during
|
||||
@ -140,7 +141,10 @@ in
|
||||
buildCommand = ''
|
||||
mkdir -p $out
|
||||
ln -s ${bootstrapTools}/lib $out/lib
|
||||
'' + lib.optionalString (localSystem.libc == "glibc") ''
|
||||
ln -s ${bootstrapTools}/include-glibc $out/include
|
||||
'' + lib.optionalString (localSystem.libc == "musl") ''
|
||||
ln -s ${bootstrapTools}/include-libc $out/include
|
||||
'';
|
||||
};
|
||||
gcc-unwrapped = bootstrapTools;
|
||||
|
Loading…
Reference in New Issue
Block a user