File tree Expand file tree Collapse file tree 10 files changed +11129
-3
lines changed Expand file tree Collapse file tree 10 files changed +11129
-3
lines changed Original file line number Diff line number Diff line change @@ -44,5 +44,8 @@ qemu-riscv64 -L /usr/riscv64-linux-gnu ./main.exe >> "$out"
4444s390x-linux-gnu-gcc -Iinclude -c list.c $cflags
4545s390x-linux-gnu-gcc main.c list.o -o main.exe $cflags
4646qemu-s390x -L /usr/s390x-linux-gnu ./main.exe >> " $out "
47+ loongarch64-linux-gnu-gcc -Iinclude -c list.c $cflags
48+ loongarch64-linux-gnu-gcc main.c list.o -o main.exe $cflags
49+ ./main.exe >> " $out "
4750
4851rm list.o main.exe
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ struct sockaddr {
9494#include <linux/joystick.h>
9595#include <linux/kd.h>
9696#include <linux/kcov.h>
97- #if !defined(__arm__ ) && !defined(__powerpc64__ ) && !defined(__riscv ) // various errors
97+ #if !defined(__arm__ ) && !defined(__loongarch__ ) && !defined( __powerpc64__ ) && !defined(__riscv ) // various errors
9898#include <linux/kvm.h>
9999#endif
100100#include <linux/lirc.h>
@@ -509,7 +509,7 @@ void list(void) {
509509 IOCTL_REQUEST (ENI_SETMULT );
510510 IOCTL_REQUEST (RIO_GET_EVENT_MASK );
511511 IOCTL_REQUEST (LIRC_GET_MAX_TIMEOUT );
512- #if !defined(__arm__ ) && !defined(__powerpc64__ ) && !defined(__riscv )
512+ #if !defined(__arm__ ) && !defined(__loongarch__ ) && !defined( __powerpc64__ ) && !defined(__riscv )
513513#if 0 // needs `struct kvm_cpuid2`
514514 IOCTL_REQUEST (KVM_GET_SUPPORTED_CPUID );
515515#endif
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ int main(void) {
4343 printf ("#if defined(__riscv) && __riscv_xlen == 64\n" );
4444#elif defined(__s390x__ )
4545 printf ("#if defined(__s390x__)\n" );
46+ #elif defined(__loongarch__ )
47+ printf ("#ifdef __loongarch__\n" );
4648#else
4749#error "unimplemented architecture"
4850#endif
You can’t perform that action at this time.
0 commit comments