From d46f05c49a18007065318d47e7dc27ecfb652218 Mon Sep 17 00:00:00 2001 From: Graham Inggs Date: Wed, 19 Jun 2024 18:57:50 +0200 Subject: [PATCH] Add support for loong64 Bug-Debian: https://bugs.debian.org/1062694 Forwarded: no Gbp-Pq: Name add-support-for-loong64.patch --- .github/workflows/CI-unix.yml | 1 + src/unix/linux.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/CI-unix.yml b/.github/workflows/CI-unix.yml index 993cfb7..9bcc76f 100644 --- a/.github/workflows/CI-unix.yml +++ b/.github/workflows/CI-unix.yml @@ -110,6 +110,7 @@ jobs: - {target: ppc64, toolchain: gcc-powerpc64-linux-gnu, cc: powerpc64-linux-gnu-gcc, qemu: qemu-ppc64-static } - {target: ppc64le, toolchain: gcc-powerpc64le-linux-gnu, cc: powerpc64le-linux-gnu-gcc, qemu: qemu-ppc64le-static } - {target: s390x, toolchain: gcc-s390x-linux-gnu, cc: s390x-linux-gnu-gcc, qemu: qemu-s390x-static } + - {target: loongarch, toolchain: gcc-loongarch-linux-gnu, cc: loongarch-linux-gnu-gcc, qemu: qemu-loongarch-static } - {target: mips, toolchain: gcc-mips-linux-gnu, cc: mips-linux-gnu-gcc, qemu: qemu-mips-static } - {target: mips64, toolchain: gcc-mips64-linux-gnuabi64, cc: mips64-linux-gnuabi64-gcc, qemu: qemu-mips64-static } - {target: mipsel, toolchain: gcc-mipsel-linux-gnu, cc: mipsel-linux-gnu-gcc, qemu: qemu-mipsel-static } diff --git a/src/unix/linux.c b/src/unix/linux.c index 4164e90..a5f6e90 100644 --- a/src/unix/linux.c +++ b/src/unix/linux.c @@ -85,6 +85,8 @@ # define __NR_copy_file_range 285 # elif defined(__riscv) # define __NR_copy_file_range 285 +# elif defined(__loongarch__) +# define __NR_copy_file_range 285 # endif #endif /* __NR_copy_file_range */ @@ -103,6 +105,8 @@ # define __NR_statx 379 # elif defined(__riscv) # define __NR_statx 291 +# elif defined(__loongarch__) +# define __NR_statx 291 # endif #endif /* __NR_statx */ @@ -121,6 +125,8 @@ # define __NR_getrandom 349 # elif defined(__riscv) # define __NR_getrandom 278 +# elif defined(__loongarch__) +# define __NR_getrandom 278 # endif #endif /* __NR_getrandom */ -- 2.30.2