summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorWANG Xuerui <git@xen0n.name>2021-12-21 13:41:04 +0800
committerRichard Henderson <richard.henderson@linaro.org>2021-12-21 13:17:06 -0800
commitdfcf900ba67040ea9aa839aa38b33b4c091721d8 (patch)
treecec594ccde80db9cbc4d8885b30d89a2af0ee9d9
parentad812c3bd6504948ee387f3e94eca7f28e8cd56f (diff)
downloadfocaccia-qemu-dfcf900ba67040ea9aa839aa38b33b4c091721d8.tar.gz
focaccia-qemu-dfcf900ba67040ea9aa839aa38b33b4c091721d8.zip
configure, meson.build: Mark support for loongarch64 hosts
Example output of `uname -a` on an initial Gentoo LA64 port, running
the upstream submission version of Linux (with some very minor patches
not influencing output here):

> Linux <hostname> 5.14.0-10342-g37a00851b145 #5 SMP PREEMPT Tue Aug 10 12:56:24 PM CST 2021 loongarch64 GNU/Linux

And the same on the vendor-supplied Loongnix 20 system, with an early
in-house port of Linux, and using the old-world ABI:

> Linux <hostname> 4.19.167-rc5.lnd.1-loongson-3 #1 SMP Sat Apr 17 07:32:32 UTC 2021 loongarch64 loongarch64 loongarch64 GNU/Linux

So a name of "loongarch64" matches both, fortunately.

Signed-off-by: WANG Xuerui <git@xen0n.name>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211221054105.178795-31-git@xen0n.name>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rwxr-xr-xconfigure5
-rw-r--r--meson.build2
2 files changed, 6 insertions, 1 deletions
diff --git a/configure b/configure
index 51eae49daf..eb977e5b6f 100755
--- a/configure
+++ b/configure
@@ -631,6 +631,8 @@ elif check_define __arm__ ; then
   cpu="arm"
 elif check_define __aarch64__ ; then
   cpu="aarch64"
+elif check_define __loongarch64 ; then
+  cpu="loongarch64"
 else
   cpu=$(uname -m)
 fi
@@ -3720,6 +3722,9 @@ if test "$linux" = "yes" ; then
   aarch64)
     linux_arch=arm64
     ;;
+  loongarch*)
+    linux_arch=loongarch
+    ;;
   mips64)
     linux_arch=mips
     ;;
diff --git a/meson.build b/meson.build
index 73d4b241df..17c7280f78 100644
--- a/meson.build
+++ b/meson.build
@@ -56,7 +56,7 @@ python = import('python').find_installation()
 
 supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux']
 supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv', 'x86', 'x86_64',
-  'arm', 'aarch64', 'mips', 'mips64', 'sparc', 'sparc64']
+  'arm', 'aarch64', 'loongarch64', 'mips', 'mips64', 'sparc', 'sparc64']
 
 cpu = host_machine.cpu_family()