mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
lib.systems: raise minimum loongarch64 feature support (#403201)
This commit is contained in:
commit
48b56e8fb5
5 changed files with 102 additions and 2 deletions
|
@ -329,6 +329,39 @@ rec {
|
|||
"avx512"
|
||||
"fma"
|
||||
];
|
||||
# LoongArch64
|
||||
# https://github.com/loongson/la-toolchain-conventions
|
||||
loongarch64 = [
|
||||
"fpu64"
|
||||
];
|
||||
la464 = [
|
||||
"fpu64"
|
||||
"lsx"
|
||||
"lasx"
|
||||
];
|
||||
la664 = [
|
||||
"fpu64"
|
||||
"lsx"
|
||||
"lasx"
|
||||
"div32"
|
||||
"frecipe"
|
||||
"lam-bh"
|
||||
"lamcas"
|
||||
"ld-seq-sa"
|
||||
];
|
||||
"la64v1.0" = [
|
||||
"fpu64"
|
||||
"lsx"
|
||||
];
|
||||
"la64v1.1" = [
|
||||
"fpu64"
|
||||
"lsx"
|
||||
"div32"
|
||||
"frecipe"
|
||||
"lam-bh"
|
||||
"lamcas"
|
||||
"ld-seq-sa"
|
||||
];
|
||||
# other
|
||||
armv5te = [ ];
|
||||
armv6 = [ ];
|
||||
|
@ -486,6 +519,16 @@ rec {
|
|||
ampere1a = [ "ampere1" ] ++ inferiors.ampere1;
|
||||
ampere1b = [ "ampere1a" ] ++ inferiors.ampere1a;
|
||||
|
||||
# LoongArch64
|
||||
loongarch64 = [ ];
|
||||
"la64v1.0" = [ "loongarch64" ];
|
||||
la464 = [ "la64v1.0" ] ++ inferiors."la64v1.0";
|
||||
"la64v1.1" = [ "la64v1.0" ] ++ inferiors."la64v1.0";
|
||||
la664 = withInferiors [
|
||||
"la464"
|
||||
"la64v1.1"
|
||||
];
|
||||
|
||||
# other
|
||||
armv5te = [ ];
|
||||
armv6 = [ ];
|
||||
|
@ -574,5 +617,7 @@ rec {
|
|||
aesSupport = featureSupport "aes";
|
||||
fmaSupport = featureSupport "fma";
|
||||
fma4Support = featureSupport "fma4";
|
||||
lsxSupport = featureSupport "lsx";
|
||||
lasxSupport = featureSupport "lasx";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -170,9 +170,17 @@ rec {
|
|||
libc = "newlib";
|
||||
};
|
||||
|
||||
loongarch64-linux = {
|
||||
# https://github.com/loongson/la-softdev-convention/blob/master/la-softdev-convention.adoc#10-operating-system-package-build-requirements
|
||||
loongarch64-linux = lib.recursiveUpdate platforms.loongarch64-multiplatform {
|
||||
config = "loongarch64-unknown-linux-gnu";
|
||||
};
|
||||
loongarch64-linux-embedded = lib.recursiveUpdate platforms.loongarch64-multiplatform {
|
||||
config = "loongarch64-unknown-linux-gnu";
|
||||
gcc = {
|
||||
arch = "loongarch64";
|
||||
strict-align = true;
|
||||
};
|
||||
};
|
||||
|
||||
mmix = {
|
||||
config = "mmix-unknown-mmixware";
|
||||
|
|
|
@ -572,6 +572,19 @@ rec {
|
|||
};
|
||||
};
|
||||
|
||||
loongarch64-multiplatform = {
|
||||
gcc = {
|
||||
# https://github.com/loongson/la-softdev-convention/blob/master/la-softdev-convention.adoc#10-operating-system-package-build-requirements
|
||||
arch = "la64v1.0";
|
||||
strict-align = false;
|
||||
# Avoid text sections of large apps exceeding default code model
|
||||
# Will be default behavior in LLVM 21 and hopefully GCC16
|
||||
# https://github.com/loongson-community/discussions/issues/43
|
||||
# https://github.com/llvm/llvm-project/pull/132173
|
||||
cmodel = "medium";
|
||||
};
|
||||
};
|
||||
|
||||
# This function takes a minimally-valid "platform" and returns an
|
||||
# attrset containing zero or more additional attrs which should be
|
||||
# included in the platform in order to further elaborate it.
|
||||
|
@ -607,6 +620,8 @@ rec {
|
|||
else if platform.parsed.cpu == lib.systems.parse.cpuTypes.powerpc64le then
|
||||
powernv
|
||||
|
||||
else if platform.isLoongArch64 then
|
||||
loongarch64-multiplatform
|
||||
else
|
||||
{ };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue