diff mbox series

[v2,30/30] configure, meson.build: Mark support for loongarch64 hosts

Message ID 20210921201915.601245-31-git@xen0n.name (mailing list archive)
State New, archived
Headers show
Series LoongArch64 port of QEMU TCG | expand

Commit Message

WANG Xuerui Sept. 21, 2021, 8:19 p.m. UTC
Signed-off-by: WANG Xuerui <git@xen0n.name>
---
 configure   | 7 ++++++-
 meson.build | 4 +++-
 2 files changed, 9 insertions(+), 2 deletions(-)

Comments

Richard Henderson Sept. 22, 2021, 4:53 p.m. UTC | #1
On 9/21/21 1:19 PM, WANG Xuerui wrote:
> @@ -269,6 +269,8 @@ if not get_option('tcg').disabled()
>       tcg_arch = 's390'
>     elif config_host['ARCH'] in ['x86_64', 'x32']
>       tcg_arch = 'i386'
> +  elif config_host['ARCH'] == 'loongarch64'
> +    tcg_arch = 'loongarch64'

You can drop this hunk.  Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

diff --git a/configure b/configure
index 1043ccce4f..3a9035385d 100755
--- a/configure
+++ b/configure
@@ -659,6 +659,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
@@ -667,7 +669,7 @@  ARCH=
 # Normalise host CPU name and set ARCH.
 # Note that this case should only have supported host CPUs, not guests.
 case "$cpu" in
-  ppc|ppc64|s390x|sparc64|x32|riscv32|riscv64)
+  ppc|ppc64|s390x|sparc64|x32|riscv32|riscv64|loongarch64)
   ;;
   ppc64le)
     ARCH="ppc64"
@@ -4969,6 +4971,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 2711cbb789..10e527423a 100644
--- a/meson.build
+++ b/meson.build
@@ -57,7 +57,7 @@  python = import('python').find_installation()
 
 supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux']
 supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv32', 'riscv64', 'x86', 'x86_64',
-  'arm', 'aarch64', 'mips', 'mips64', 'sparc', 'sparc64']
+  'arm', 'aarch64', 'loongarch64', 'mips', 'mips64', 'sparc', 'sparc64']
 
 cpu = host_machine.cpu_family()
 targetos = host_machine.system()
@@ -269,6 +269,8 @@  if not get_option('tcg').disabled()
     tcg_arch = 's390'
   elif config_host['ARCH'] in ['x86_64', 'x32']
     tcg_arch = 'i386'
+  elif config_host['ARCH'] == 'loongarch64'
+    tcg_arch = 'loongarch64'
   elif config_host['ARCH'] == 'ppc64'
     tcg_arch = 'ppc'
   elif config_host['ARCH'] in ['riscv32', 'riscv64']