lib/systems: musl, libc predicates
Note this doesn't actually provide musl support yet, just improves our "system" code to understand musl-based triples and non-glibc linux configurations.
This commit is contained in:
parent
69779a5f7e
commit
2dfee94fe7
@ -26,7 +26,9 @@ rec {
|
||||
libc =
|
||||
/**/ if final.isDarwin then "libSystem"
|
||||
else if final.isMinGW then "msvcrt"
|
||||
else if final.isLinux then "glibc"
|
||||
else if final.isLinux && final.isGlibc then "glibc"
|
||||
else if final.isLinux && final.isMusl then "musl"
|
||||
else if final.isLinux /* default */ then "glibc"
|
||||
# TODO(@Ericson2314) think more about other operating systems
|
||||
else "native/impure";
|
||||
extensions = {
|
||||
|
@ -13,7 +13,6 @@ rec {
|
||||
config = "armv5tel-unknown-linux-gnueabi";
|
||||
arch = "armv5tel";
|
||||
float = "soft";
|
||||
libc = "glibc";
|
||||
platform = platforms.sheevaplug;
|
||||
};
|
||||
|
||||
@ -22,7 +21,6 @@ rec {
|
||||
arch = "armv6l";
|
||||
float = "hard";
|
||||
fpu = "vfp";
|
||||
libc = "glibc";
|
||||
platform = platforms.raspberrypi;
|
||||
};
|
||||
|
||||
@ -31,14 +29,12 @@ rec {
|
||||
arch = "armv7-a";
|
||||
float = "hard";
|
||||
fpu = "vfpv3-d16";
|
||||
libc = "glibc";
|
||||
platform = platforms.armv7l-hf-multiplatform;
|
||||
};
|
||||
|
||||
aarch64-multiplatform = rec {
|
||||
config = "aarch64-unknown-linux-gnu";
|
||||
arch = "aarch64";
|
||||
libc = "glibc";
|
||||
platform = platforms.aarch64-multiplatform;
|
||||
};
|
||||
|
||||
@ -51,7 +47,6 @@ rec {
|
||||
arch = "armv5tel";
|
||||
config = "armv5tel-unknown-linux-gnueabi";
|
||||
float = "soft";
|
||||
libc = "glibc";
|
||||
platform = platforms.pogoplug4;
|
||||
};
|
||||
|
||||
@ -59,10 +54,20 @@ rec {
|
||||
config = "mips64el-unknown-linux-gnu";
|
||||
arch = "mips";
|
||||
float = "hard";
|
||||
libc = "glibc";
|
||||
platform = platforms.fuloong2f_n32;
|
||||
};
|
||||
|
||||
muslpi = raspberryPi // {
|
||||
config = "armv6l-unknown-linux-musleabihf";
|
||||
};
|
||||
|
||||
aarch64-multiplatform-musl = aarch64-multiplatform // {
|
||||
config = "aarch64-unknown-linux-musl";
|
||||
};
|
||||
|
||||
musl64 = { config = "x86_64-unknown-linux-musl"; };
|
||||
musl32 = { config = "i686-unknown-linux-musl"; };
|
||||
|
||||
#
|
||||
# Darwin
|
||||
#
|
||||
|
@ -33,6 +33,9 @@ rec {
|
||||
Windows = { kernel = kernels.windows; };
|
||||
Cygwin = { kernel = kernels.windows; abi = abis.cygnus; };
|
||||
MinGW = { kernel = kernels.windows; abi = abis.gnu; };
|
||||
|
||||
Musl = with abis; map (a: { abi = a; }) [ musl musleabi musleabihf ];
|
||||
Glibc = with abis; map (a: { abi = a; }) [ gnu gnueabi gnueabihf ];
|
||||
};
|
||||
|
||||
matchAnyAttrs = patterns:
|
||||
|
@ -180,6 +180,9 @@ rec {
|
||||
androideabi = {};
|
||||
gnueabi = {};
|
||||
gnueabihf = {};
|
||||
musleabi = {};
|
||||
musleabihf = {};
|
||||
musl = {};
|
||||
|
||||
unknown = {};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user