tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
linux bootstrap for musl: kludgery
Will Dietz
8 years ago
3ee50949
e4d5928b
+7
-3
2 changed files
expand all
collapse all
unified
split
pkgs
stdenv
linux
bootstrap-tools-musl
default.nix
default.nix
+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
17
-
isGNU = false;
17
17
+
isGNU = true;
18
18
}
+6
-2
pkgs/stdenv/linux/default.nix
···
6
6
{ lib
7
7
, localSystem, crossSystem, config, overlays
8
8
9
9
-
, bootstrapFiles ? { # switch
9
9
+
, bootstrapFiles ? if localSystem.libc == "musl" then import ./bootstrap-files/musl64.nix
10
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
43
-
bootstrapTools = import ./bootstrap-tools { inherit system bootstrapFiles; };
44
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
144
+
'' + lib.optionalString (localSystem.libc == "glibc") ''
143
145
ln -s ${bootstrapTools}/include-glibc $out/include
146
146
+
'' + lib.optionalString (localSystem.libc == "musl") ''
147
147
+
ln -s ${bootstrapTools}/include-libc $out/include
144
148
'';
145
149
};
146
150
gcc-unwrapped = bootstrapTools;