]> git.ipfire.org Git - thirdparty/qemu.git/commit
Allow building qemu tools on 32-bit hosts
authorHelge Deller <deller@kernel.org>
Sat, 4 Apr 2026 22:40:16 +0000 (00:40 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 8 Apr 2026 10:48:50 +0000 (13:48 +0300)
commitcf634dfcd8fc5dded8849d41e2eeaa189b06feb0
tree4657037297c09eb85c1c705713dc293dbb037b17
parent276b060a743609bb41bc7ae3f6942e2bcc29a641
Allow building qemu tools on 32-bit hosts

Qemu's tools like qemu-img are often needed on 32-bit platforms,
although the actual qemu emulators have been discontinued on 32-bit.

To allow building the tools on 32-bit this patch implements three small
changes:

a) The check in meson.build is changed to still error out if the user
tries to build qemu-system or qemu-user on a 32-bit platform, but allows
building tools (e.g. by "--enable-tools") alone.

b) The compile time check in atomic.h now checks against
sizeof(uint64_t) so that 32-bit environments can still build
successfully, while 128-bit atomic operations are prevented to sneak in.

c) Allow linking against libatomic as long as we don't build the
qemu-system and qemu-user binaries.

Sucessfully tested on the 32-bit big-endian powerpc architecture.

Signed-off-by: Helge Deller <deller@gmx.de>
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
include/qemu/atomic.h
meson.build