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