diff options
| -rw-r--r-- | meta/classes-recipe/libc-package.bbclass | 3 | ||||
| -rw-r--r-- | meta/classes-recipe/meson-routines.bbclass | 2 | ||||
| -rw-r--r-- | meta/classes-recipe/rust-target-config.bbclass | 11 |
3 files changed, 15 insertions, 1 deletions
diff --git a/meta/classes-recipe/libc-package.bbclass b/meta/classes-recipe/libc-package.bbclass index 8a99f73ae7..bf160b115d 100644 --- a/meta/classes-recipe/libc-package.bbclass +++ b/meta/classes-recipe/libc-package.bbclass | |||
| @@ -268,7 +268,8 @@ python package_do_split_gconvs () { | |||
| 268 | "riscv32": " --uint32-align=4 --little-endian ", \ | 268 | "riscv32": " --uint32-align=4 --little-endian ", \ |
| 269 | "i586": " --uint32-align=4 --little-endian ", \ | 269 | "i586": " --uint32-align=4 --little-endian ", \ |
| 270 | "i686": " --uint32-align=4 --little-endian ", \ | 270 | "i686": " --uint32-align=4 --little-endian ", \ |
| 271 | "x86_64": " --uint32-align=4 --little-endian " } | 271 | "x86_64": " --uint32-align=4 --little-endian ", \ |
| 272 | "loongarch64": " --uint32-align=4 --little-endian " } | ||
| 272 | 273 | ||
| 273 | if target_arch in locale_arch_options: | 274 | if target_arch in locale_arch_options: |
| 274 | localedef_opts = locale_arch_options[target_arch] | 275 | localedef_opts = locale_arch_options[target_arch] |
diff --git a/meta/classes-recipe/meson-routines.bbclass b/meta/classes-recipe/meson-routines.bbclass index 6086fce9d9..a944a8fff1 100644 --- a/meta/classes-recipe/meson-routines.bbclass +++ b/meta/classes-recipe/meson-routines.bbclass | |||
| @@ -23,6 +23,8 @@ def meson_cpu_family(var, d): | |||
| 23 | return 'arm' | 23 | return 'arm' |
| 24 | elif arch == 'aarch64_be': | 24 | elif arch == 'aarch64_be': |
| 25 | return 'aarch64' | 25 | return 'aarch64' |
| 26 | elif arch == 'loongarch64': | ||
| 27 | return 'loongarch64' | ||
| 26 | elif arch == 'mipsel': | 28 | elif arch == 'mipsel': |
| 27 | return 'mips' | 29 | return 'mips' |
| 28 | elif arch == 'mips64el': | 30 | elif arch == 'mips64el': |
diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass index 5e71546fee..21a56ede3e 100644 --- a/meta/classes-recipe/rust-target-config.bbclass +++ b/meta/classes-recipe/rust-target-config.bbclass | |||
| @@ -245,6 +245,14 @@ TARGET_POINTER_WIDTH[riscv64gc] = "64" | |||
| 245 | TARGET_C_INT_WIDTH[riscv64gc] = "64" | 245 | TARGET_C_INT_WIDTH[riscv64gc] = "64" |
| 246 | MAX_ATOMIC_WIDTH[riscv64gc] = "64" | 246 | MAX_ATOMIC_WIDTH[riscv64gc] = "64" |
| 247 | 247 | ||
| 248 | ## loongarch64-unknown-linux-{gnu, musl} | ||
| 249 | DATA_LAYOUT[loongarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128" | ||
| 250 | TARGET_ENDIAN[loongarch64] = "little" | ||
| 251 | TARGET_POINTER_WIDTH[loongarch64] = "64" | ||
| 252 | TARGET_C_INT_WIDTH[loongarch64] = "32" | ||
| 253 | MAX_ATOMIC_WIDTH[loongarch64] = "64" | ||
| 254 | FEATURES[loongarch64] = "+d" | ||
| 255 | |||
| 248 | # Convert a normal arch (HOST_ARCH, TARGET_ARCH, BUILD_ARCH, etc) to something | 256 | # Convert a normal arch (HOST_ARCH, TARGET_ARCH, BUILD_ARCH, etc) to something |
| 249 | # rust's internals won't choke on. | 257 | # rust's internals won't choke on. |
| 250 | def arch_to_rust_target_arch(arch): | 258 | def arch_to_rust_target_arch(arch): |
| @@ -288,6 +296,7 @@ def llvm_cpu(d): | |||
| 288 | trans['mips64el'] = "mips64" | 296 | trans['mips64el'] = "mips64" |
| 289 | trans['riscv64'] = "generic-rv64" | 297 | trans['riscv64'] = "generic-rv64" |
| 290 | trans['riscv32'] = "generic-rv32" | 298 | trans['riscv32'] = "generic-rv32" |
| 299 | trans['loongarch64'] = "la464" | ||
| 291 | 300 | ||
| 292 | if target in ["mips", "mipsel", "powerpc"]: | 301 | if target in ["mips", "mipsel", "powerpc"]: |
| 293 | feat = frozenset(d.getVar('TUNE_FEATURES').split()) | 302 | feat = frozenset(d.getVar('TUNE_FEATURES').split()) |
| @@ -367,6 +376,8 @@ def rust_gen_target(d, thing, wd, arch): | |||
| 367 | tspec['llvm-abiname'] = "lp64d" | 376 | tspec['llvm-abiname'] = "lp64d" |
| 368 | if "riscv32" in tspec['llvm-target']: | 377 | if "riscv32" in tspec['llvm-target']: |
| 369 | tspec['llvm-abiname'] = "ilp32d" | 378 | tspec['llvm-abiname'] = "ilp32d" |
| 379 | if "loongarch64" in tspec['llvm-target']: | ||
| 380 | tspec['llvm-abiname'] = "lp64d" | ||
| 370 | tspec['vendor'] = "unknown" | 381 | tspec['vendor'] = "unknown" |
| 371 | tspec['target-family'] = "unix" | 382 | tspec['target-family'] = "unix" |
| 372 | tspec['linker'] = "{}{}gcc".format(d.getVar('CCACHE'), prefix) | 383 | tspec['linker'] = "{}{}gcc".format(d.getVar('CCACHE'), prefix) |
