From nobody Fri Apr 3 03:42:50 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=1774451923; cv=none; d=zohomail.com; s=zohoarc; b=m9Cx9NzlBzBrabEYE5R4/rgfJL/Y88PPDvHeSkr5Hrof9yUOcvcQ4hOgcLTWLoh0quwWJ8bPuPrrUiuv614e1J0TsXGu2Z+ojUid5C3/UUJecMfLvtCavz+L9EX5JOnWGW8TPVskRIiDbcRsOr4/R7JHjx22qihNlFWF38vLOgM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774451923; h=Content-Type:Content-Transfer-Encoding:Cc:Cc: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; bh=cHp+isFeJ+Vwq620YK3TTBZ1M5KgDnZyZo3PdDfV4Bw=; b=SRJRFLZLHL58gdBm9tmGa3G5qgu1OPMbOasHQ29Ogi76L9A1EvmxYiqAEvd0iWvV4kiqUf3fPPbwxEgPSkUvvxR22HLageLxzGn7mhqECeVLPcfUDe+ipn8c0pPjmyrdTA+xStRNGbn61hiOj8lXL+zwabenWSBvNaD5iAJqJ8I= 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 17744519229817.237844558520123; Wed, 25 Mar 2026 08:18:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w5Q01-0005aL-Rr; Wed, 25 Mar 2026 11:18:25 -0400 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 1w5Pzv-0005Cx-Mx for qemu-devel@nongnu.org; Wed, 25 Mar 2026 11:18:20 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w5Pzt-0000Uy-Lp for qemu-devel@nongnu.org; Wed, 25 Mar 2026 11:18:19 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-486fb14227cso27726625e9.3 for ; Wed, 25 Mar 2026 08:18:17 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4871e60322asm1408455e9.7.2026.03.25.08.18.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Mar 2026 08:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774451896; x=1775056696; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cHp+isFeJ+Vwq620YK3TTBZ1M5KgDnZyZo3PdDfV4Bw=; b=mFjLHo9jYg43yirpOTJqhwgWbHEJYkPLWr956jdWuSTeBTBt9OIA2aBueU2+fBcwWo +tKCkqTVeiX7/fpF21veSlIlbgXCtvqVnKOv+bWFal0Of+OQwfGXicHDv7oVwUXpy/S3 8ujPuTDTPgBsbbt7XZmp2DRNRATOAY7d7qx8HoPyr1QWsPxpCN6CBRCtS6V01P+jWd0G VAquij1iRRPZHq9u8WTWYlxHkZh0wWqiKo4DwlDU0F4rzaYxXXm1iufHMyvkwukjfRpe 5munUnd4Z4MpIctWb/NL8jtjP6pjRbwGU9Mah7gkTaRBPNtn45xE/ZEOSBri1cXiXjNE IUmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774451896; x=1775056696; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cHp+isFeJ+Vwq620YK3TTBZ1M5KgDnZyZo3PdDfV4Bw=; b=WBMSvTwsj2u9gIFp2ZqnQI/GRPVkPRsaWKBzFHyl+NPdct6SNvYsSOzr1RzsR7EWRi 6QSqGw5hIMIGZdv6Kwc7W3rwziCwU+bhRb9XDQuubii4s1W8hdeYH1Irrq65SrtK+c9U FwntwQj6NEPKqI9BLZvTrli7dAmubi17mMZCnU3Fi4x/8vk3oaTdKe5L7PDJGL6uKBNY gsu7RS/ckl5iFqj3r7xJrrNcWkibk7lIv/PmFn5tv2r00cA4mTK4MjuYKWcxnd9z1KyQ P34o1yS3vc0EkVnciL9Cp40sipzH9+KJPdZAU0FgVTYgaQLJJuJeuYnCHRkMPcr/bf+f ME3A== X-Forwarded-Encrypted: i=1; AJvYcCWhKVoOmeEWDKFtT5ZwUFEHOiTqKFrOZEBtkXEJQL77zet51u64psBRiTeEPE1ZSDXB9kizIhHnHJHe@nongnu.org X-Gm-Message-State: AOJu0YyjdiJkN47jrpn9/8ZMvMk8bVVPpq9XylyLbjFfOQHonnKmlhMU qN9Bqc/WE7tV1aWCbkUuFfQfCr/N/dOH8/Cf1KNXN2WEZyA5sVTzL2/2TR0yJj3NM1TrZ09u0o1 Iy+g7+r8= X-Gm-Gg: ATEYQzxufFDgRrY2e+iMhUhexbMSDdSR+QgOwUZz0qHOnY8+9A5NsPom+6CKSILo7h1 CWTRpC/2NHQe29PRCE4cSyf2HUgb0SEgx7qGr3bB68GFjv/8n2lieyrbQikow4wksW1PhznHpVe CW4cMCjxXnQSrFGC2CYG7PDDcLltXLGRx+umKr8U7nNG5BLcA4uLA49bGMonhJ4gzSDXeER3RLK fvA1Itk91Jgpt3glhf6hD77vkspPgqrukkxSFa2OZgd0FLN8e+rEDsGmw7f0RYqx9Lo1fJfetWQ 9M7xbHZQV5X+kAF10W0IxKpQnPSlsnqHLyCXGVXEtFAeMZR1zMgcF4rrRQpUqPd32Jfsa4xpfJ/ /T+qpzuxVHdR0Z7OHyKX1epjcU/fhd+V1cGgKG5aFhDRiqbNGX4ow6sarnzNxoLngkdn52HPdqk E5W08m8aQXBaxSNJZmt1SOn+aq4zJbE6b2VDFJSgz2FiiJKY+vjmeem/QF/14qWT7V/H7l7RZ83 w4oUSMZxKU= X-Received: by 2002:a05:600c:a408:b0:485:3f58:d9f with SMTP id 5b1f17b1804b1-487160a24e2mr43858395e9.30.1774451895998; Wed, 25 Mar 2026 08:18:15 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Tokarev , qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , kvm@vger.kernel.org Subject: [NOTFORMERGE PATCH 6/6] buildsys: Allow building guest-agent on 32-bit hosts Date: Wed, 25 Mar 2026 16:17:28 +0100 Message-ID: <20260325151728.45378-7-philmd@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260325151728.45378-1-philmd@linaro.org> References: <20260325151728.45378-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 client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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: 1774451924089158500 Partially revert commit range 5053e0a65db...90e2e8ada7c. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- configure | 64 +++++++++++++++++++++++++++++++++++++++++++---------- meson.build | 2 +- 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/configure b/configure index eea90306728..e984ec2bd3c 100755 --- a/configure +++ b/configure @@ -381,6 +381,8 @@ fi if test ! -z "$cpu" ; then # command line argument : +elif check_define __i386__ ; then + cpu=3D"i386" elif check_define __x86_64__ ; then if check_define __ILP32__ ; then cpu=3D"x32" @@ -399,22 +401,30 @@ elif check_define _ARCH_PPC64 ; then else cpu=3D"ppc64" fi -elif check_define __mips64 ; then - cpu=3D"mips64" +elif check_define __mips__ ; then + if check_define __mips64 ; then + cpu=3D"mips64" + fi elif check_define __s390__ ; then if check_define __s390x__ ; then cpu=3D"s390x" else cpu=3D"s390" fi -elif check_define __riscv && check_define _LP64 ; then - cpu=3D"riscv64" +elif check_define __riscv ; then + if check_define _LP64 ; then + cpu=3D"riscv64" + else + cpu=3D"riscv32" + fi +elif check_define __arm__ ; then + cpu=3D"arm" elif check_define __aarch64__ ; then cpu=3D"aarch64" elif check_define __loongarch64 ; then cpu=3D"loongarch64" elif check_define EMSCRIPTEN ; then - error_exit "wasm64 must be specified to the cpu flag" + 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 @@ -440,6 +450,18 @@ case "$cpu" in linux_arch=3Darm64 ;; =20 + armv*b|armv*l|arm) + cpu=3Darm + host_arch=3Darm + ;; + + i386|i486|i586|i686) + cpu=3D"i386" + host_arch=3Di386 + linux_arch=3Dx86 + CPU_CFLAGS=3D"-m32" + ;; + loongarch*) cpu=3Dloongarch64 host_arch=3Dloongarch64 @@ -448,7 +470,7 @@ case "$cpu" in =20 mips64*|mipsisa64*) cpu=3Dmips64 - host_arch=3Dmips64 + host_arch=3Dmips linux_arch=3Dmips ;; =20 @@ -464,8 +486,8 @@ case "$cpu" in CPU_CFLAGS=3D"-m64 -mlittle-endian" ;; =20 - riscv64) - host_arch=3Driscv64 + riscv32 | riscv64) + host_arch=3Driscv linux_arch=3Driscv ;; =20 @@ -500,6 +522,9 @@ case "$cpu" in linux_arch=3Dx86 CPU_CFLAGS=3D"-m64" ;; + wasm32) + CPU_CFLAGS=3D"-m32" + ;; wasm64) CPU_CFLAGS=3D"-m64 -sMEMORY64=3D$wasm64_memory64" ;; @@ -1287,7 +1312,7 @@ EOF test "$bigendian" =3D no && rust_arch=3D${rust_arch}el ;; =20 - riscv64) + riscv32|riscv64) # e.g. riscv64gc-unknown-linux-gnu, but riscv64-linux-android test "$android" =3D no && rust_arch=3D${rust_arch}gc ;; @@ -1449,18 +1474,26 @@ probe_target_compiler() { container_image=3Ddebian-all-test-cross container_cross_prefix=3Daarch64-linux-gnu- ;; - alpha|hppa|m68k|mips|riscv64|sh4|sparc64) + hppa|m68k|mips|riscv64|sparc64) container_image=3Ddebian-all-test-cross ;; mips64) container_image=3Ddebian-all-test-cross container_cross_prefix=3Dmips64-linux-gnuabi64- ;; - ppc|ppc64|ppc64le) + ppc64|ppc64le) container_image=3Ddebian-all-test-cross container_cross_prefix=3Dpowerpc${target_arch#ppc}-linux-gnu- ;; =20 + # debian-legacy-test-cross architectures (need Debian 11) + # - libc6.1-dev-alpha-cross: https://bugs.debian.org/cgi-bin/bugrepo= rt.cgi?bug=3D1054412 + # - sh4-linux-user: binaries don't run with bookworm compiler + + alpha|sh4) + container_image=3Ddebian-legacy-test-cross + ;; + # architectures with individual containers =20 aarch64) @@ -1930,7 +1963,14 @@ if test "$skip_meson" =3D no; then if test "$cross_compile" =3D "yes"; then echo "[host_machine]" >> $cross echo "system =3D '$host_os'" >> $cross - echo "cpu_family =3D '$cpu'" >> $cross + case "$cpu" in + i386) + echo "cpu_family =3D 'x86'" >> $cross + ;; + *) + echo "cpu_family =3D '$cpu'" >> $cross + ;; + esac echo "cpu =3D '$cpu'" >> $cross if test "$bigendian" =3D "yes" ; then echo "endian =3D 'big'" >> $cross diff --git a/meson.build b/meson.build index d7c4095b395..ae412263ec7 100644 --- a/meson.build +++ b/meson.build @@ -323,7 +323,7 @@ endif # Compiler flags # ################## =20 -if cc.sizeof('void *') < 8 +if not have_ga and cc.sizeof('void *') < 8 error('QEMU requires a 64-bit CPU host architecture') endif =20 --=20 2.53.0