qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 28/30] configure, meson.build: Mark support for 64-bit LoongA


From: WANG Xuerui
Subject: Re: [PATCH 28/30] configure, meson.build: Mark support for 64-bit LoongArch hosts
Date: Tue, 21 Sep 2021 14:02:45 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Thunderbird/94.0a1

Hi Richard,

On 9/21/21 01:23, Richard Henderson wrote:
On 9/20/21 1:04 AM, WANG Xuerui wrote:
Signed-off-by: WANG Xuerui <git@xen0n.name>
---
  configure   | 4 +++-
  meson.build | 4 +++-
  2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 1043ccce4f..f1bc85e71b 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"
diff --git a/meson.build b/meson.build
index 2711cbb789..fb3befead5 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 = 'loongarch'

Be consistent with loongarch or loongarch64 everywhere.

If there's no loongarch32, and never will be, then there's probably no point in keeping the '64' suffix.

The loongarch32 tuple will most certainly come into existence some time in the future, but probably bare-metal-only and without a Linux port AFAIK. That's a point the Loongson people and I didn't communicate well, apologizes for that. (While we're at it, the reserved "loongarchx32" which is x32/n32-like, most likely will never exist.)

So should I drop the explicit probing for __loongarch64, instead just probe for __loongarch__ and later #error out the non-__loongarch64 cases individually?



r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]