From nobody Mon Feb 9 01:02:27 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1768562352; cv=none; d=zohomail.com; s=zohoarc; b=m+Dz/Tpy+6V7HO94LG1j2cBGCpGff8+6xqFkk+BAI0HumjSdkNTGRuvYOBBC9XYOZpPCq40Iwl48Mpkihmq0VsaDc3qfLO10S7nT2FxSYrlg7CfinPnH7T42vuv+9k2Ro+As9h+hBXUUbZNBsT9mZtWGgNTYphlVZbgrqYGqhes= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768562352; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=+lSDqpgt49/OyQ2ExzKjU606U5rmO2/rMItUS6X3ncQ=; b=VT522iRPW3lMoTAnyQpmtBKKDqyeiM9JhH2HdUBzV5DQMpsw5dKpv7CWNP/nDmc8qa0m9RI0XjJoQN6pPKPiyDzzZWH3CuH+QKLDyZ7FkTEpakdaTVqb6sqRAWzCmqD3N91XOVwZn+z8z4AKVjAJuwvhmWxTvrkaQOLpYp8X2SA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1768562352069677.5039331120536; Fri, 16 Jan 2026 03:19:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vghql-0007JC-Ef; Fri, 16 Jan 2026 06:18:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vghqh-0007I1-S6 for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:41 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vghqf-0005hX-TX for qemu-devel@nongnu.org; Fri, 16 Jan 2026 06:18:39 -0500 Received: by mail-wr1-x441.google.com with SMTP id ffacd0b85a97d-42fbc305882so999314f8f.0 for ; Fri, 16 Jan 2026 03:18:37 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4356997eb1fsm4746688f8f.35.2026.01.16.03.18.35 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Jan 2026 03:18:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1768562316; x=1769167116; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=+lSDqpgt49/OyQ2ExzKjU606U5rmO2/rMItUS6X3ncQ=; b=XWi3BOoju3xmOr9zUExzCOWDplb0NMhWJfhErBEGK+/s157RmUoNDQhiaKEn1N7iUG Mubblyheu57hYJmhehlJVvVBNuhKWKjw2nVT+yrWbF/K64B7zAq+jOl0mrzTUh8L58zp Fzc75fzACPkSRxKKWO83lap23trZvH7AagejfJBs+MJW2jdPK4idDEU/V9ZZXeAFLoxB tHH8Clcylifjnr18XAwaF2lpfqgHzc91mnhnEXvlO5u9dfleJ0l7UWczKoGAdHcEJaYe stH5w9YMZDvUGpLTXIxb0UWH5/TpYBtTQqPxkGH5lw/qPN3r4jTYXxQ15AwdV3Q29SL2 5Qjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768562316; x=1769167116; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=+lSDqpgt49/OyQ2ExzKjU606U5rmO2/rMItUS6X3ncQ=; b=vZs19zlWz38P8wse+a47dBqc3AHKxL4DQpdDPKmIDdvFbC/YAz5K0fNCCBqb2WYV6g 6Pp4bhBsWcogigUOY0eJWfirzRzQp2I45fUBRJA3+k1iTgFy+DJE/qoJFxQkR1z91dn1 gpcqiZmE4oBbiezoJYYI77kzdIbheGKu1/tACcQ/1MefpIfJt6ddzvo2Wh8/L4fS+jnR VgBGjOI4dgfteJ1hhhWzM8jVh2PSFwVBfoOsDBtwSV/p2zlktJn5/VnetnY7CQZLfZ4S +UZakKS/CiVhEWEFi+Xc8f74jPFYs951prC7W0w90umfDWi7/3uBsb1eGZWQVfgxeAgD XShA== X-Gm-Message-State: AOJu0YzB31u8P2NiYyRA2q9hfrkSXCjSrX5WKut8mv0e0eWqA5gmE90h 8toUT95Dqv7uPupjRV9tiiZivkoP4QAvrJwHUFHJQMsFpowSDdiDLXPpnry+MKl0LK9gp1kLYss /sMZSAB0= X-Gm-Gg: AY/fxX7Q9zjz73OsBKotUTeU5yptz4tW10EL5OE/P16WSEIeBhzwEYFyfuUTDwnNXcW Ner2bAHEegIn8+YAxIeJzXmwOgrN2nPl3N/ghOPop+eVR9bNLhowJ4K/1LPnFSXc30U9ypWKgC7 GD6tzOnknk2fOxF6FMYCxyPQqpKvXAUoJ+I8PKBVRhgr456myzDvlaxsP4GwW0H+iLZsSi6vtEJ A8y4DWa2gKlN0A3hneDNfWOUlM4CH6k7dhZ8hF6b036C6ougWo0ZNGQP5IjBTo/Wacj6/9LwsnZ qnpUJD+OdBhjjMis+md3mlqTsz1Aeu4QWGOm8jNvN1J17RgVn3rAxeW4B3aqY4r/ZQMA/4GdFz5 FadUScuwCEA0Dc5FPoCGLinOk5nMjxzquuiNbR57uUTEVKD5JOg/DZ5rklt6PCD9YadmORDXv8m Ebg35Vw8M2k1QuJ6w5KhN1jZrM6DRjeyyz5UDVWs3IPtN0YNmb1BWCGqW7viT94p4GoAv2Hi8= X-Received: by 2002:a05:6000:2382:b0:432:86a3:ef2e with SMTP id ffacd0b85a97d-4356998ad0dmr2794824f8f.21.1768562316001; Fri, 16 Jan 2026 03:18:36 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 04/30] meson: Add wasm64 support to the --cpu flag Date: Fri, 16 Jan 2026 12:17:41 +0100 Message-ID: <20260116111807.36053-5-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260116111807.36053-1-philmd@linaro.org> References: <20260116111807.36053-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=philmd@linaro.org; helo=mail-wr1-x441.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1768562353969158500 From: Kohei Tokunaga wasm64 target enables 64bit pointers using Emscripten's -sMEMORY64=3D1 flag[1]. This enables QEMU to run 64bit guests. Although the configure script uses "uname -m" as the fallback value when "cpu" is empty, this can't be used for Emscripten which targets to Wasm. So, in wasm build, this commit fixes configure to require --cpu flag to be explicitly specified by the user. [1] https://emscripten.org/docs/tools_reference/settings_reference.html#mem= ory64 Signed-off-by: Kohei Tokunaga Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson Message-ID: <91f16f0e9ae6b36fbf0c2caac510dcf855120400.1768308374.git.ktokun= aga.mail@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- configure | 6 +++++- meson.build | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 55e0bd34256..92bfc5f9765 100755 --- a/configure +++ b/configure @@ -365,7 +365,6 @@ elif check_define __APPLE__; then host_os=3Ddarwin elif check_define EMSCRIPTEN ; then host_os=3Demscripten - cpu=3Dwasm32 cross_compile=3D"yes" else # This is a fatal error, but don't report it yet, because we @@ -419,6 +418,8 @@ elif check_define __aarch64__ ; then cpu=3D"aarch64" elif check_define __loongarch64 ; then cpu=3D"loongarch64" +elif check_define EMSCRIPTEN ; then + error_exit "wasm32 or wasm64 must be specified to the cpu flag" else # Using uname is really broken, but it is just a fallback for architectu= res # that are going to use TCI anyway @@ -519,6 +520,9 @@ case "$cpu" in wasm32) CPU_CFLAGS=3D"-m32" ;; + wasm64) + CPU_CFLAGS=3D"-m64 -sMEMORY64=3D1" + ;; esac =20 if test -n "$host_arch" && { diff --git a/meson.build b/meson.build index c58007291a8..600c50007da 100644 --- a/meson.build +++ b/meson.build @@ -51,7 +51,7 @@ qapi_trace_events =3D [] bsd_oses =3D ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly',= 'darwin'] supported_oses =3D ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', '= sunos', 'linux', 'emscripten'] supported_cpus =3D ['ppc', 'ppc64', 's390x', 'riscv32', 'riscv64', 'x86', = 'x86_64', - 'arm', 'aarch64', 'loongarch64', 'mips64', 'sparc64', 'wasm32'] + 'arm', 'aarch64', 'loongarch64', 'mips64', 'sparc64', 'wasm32', 'wasm64'] =20 cpu =3D host_machine.cpu_family() =20 @@ -923,7 +923,7 @@ if have_tcg if not get_option('tcg_interpreter') error('Unsupported CPU @0@, try --enable-tcg-interpreter'.format(cpu= )) endif - elif host_arch =3D=3D 'wasm32' + elif host_arch =3D=3D 'wasm32' or host_arch =3D=3D 'wasm64' if not get_option('tcg_interpreter') error('WebAssembly host requires --enable-tcg-interpreter') endif --=20 2.52.0