[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-9.1.1 40/49] meson: ensure -mcx16 is passed when detecting ATOMI
From: |
Michael Tokarev |
Subject: |
[Stable-9.1.1 40/49] meson: ensure -mcx16 is passed when detecting ATOMIC128 |
Date: |
Wed, 16 Oct 2024 23:09:59 +0300 |
From: Paolo Bonzini <pbonzini@redhat.com>
Moving -mcx16 out of CPU_CFLAGS caused the detection of ATOMIC128 to
fail, because flags have to be specified by hand in cc.compiles and
cc.links invocations (why oh why??).
Ensure that these tests enable all the instruction set extensions that
will be used to build the emulators.
Fixes: c2bf2ccb266 ("configure: move -mcx16 flag out of CPU_CFLAGS", 2024-05-24)
Reported-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 8db4e0f92e83fd80b6609439440b303ddded7ad8)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/meson.build b/meson.build
index 3031f37f45..a11018b3ad 100644
--- a/meson.build
+++ b/meson.build
@@ -2795,7 +2795,7 @@ config_host_data.set('CONFIG_ATOMIC64', cc.links('''
__atomic_exchange_n(&x, y, __ATOMIC_RELAXED);
__atomic_fetch_add(&x, y, __ATOMIC_RELAXED);
return 0;
- }'''))
+ }''', args: qemu_isa_flags))
has_int128_type = cc.compiles('''
__int128_t a;
@@ -2829,7 +2829,7 @@ if has_int128_type
__atomic_compare_exchange_n(&p[4], &p[5], p[6], 0, __ATOMIC_RELAXED,
__ATOMIC_RELAXED);
return 0;
}'''
- has_atomic128 = cc.links(atomic_test_128)
+ has_atomic128 = cc.links(atomic_test_128, args: qemu_isa_flags)
config_host_data.set('CONFIG_ATOMIC128', has_atomic128)
@@ -2838,7 +2838,8 @@ if has_int128_type
# without optimization enabled. Try again with optimizations locally
# enabled for the function. See
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107389
- has_atomic128_opt = cc.links('__attribute__((optimize("O1")))' +
atomic_test_128)
+ has_atomic128_opt = cc.links('__attribute__((optimize("O1")))' +
atomic_test_128,
+ args: qemu_isa_flags)
config_host_data.set('CONFIG_ATOMIC128_OPT', has_atomic128_opt)
if not has_atomic128_opt
@@ -2849,7 +2850,7 @@ if has_int128_type
__sync_val_compare_and_swap_16(&x, y, x);
return 0;
}
- '''))
+ ''', args: qemu_isa_flags))
endif
endif
endif
--
2.39.5
- [Stable-9.1.1 00/49] Patch Round-up for stable 9.1.1, freeze on 2024-10-16 (frozen), Michael Tokarev, 2024/10/16
- [Stable-9.1.1 33/49] linux-user/flatload: Take mmap_lock in load_flt_binary(), Michael Tokarev, 2024/10/16
- [Stable-9.1.1 34/49] linux-user: Fix parse_elf_properties GNU0_MAGIC check, Michael Tokarev, 2024/10/16
- [Stable-9.1.1 35/49] tcg/ppc: Use TCG_REG_TMP2 for scratch tcg_out_qemu_st, Michael Tokarev, 2024/10/16
- [Stable-9.1.1 36/49] tcg/ppc: Use TCG_REG_TMP2 for scratch index in prepare_host_addr, Michael Tokarev, 2024/10/16
- [Stable-9.1.1 37/49] target/m68k: Always return a temporary from gen_lea_mode, Michael Tokarev, 2024/10/16
- [Stable-9.1.1 38/49] meson: fix machine option for x86_version, Michael Tokarev, 2024/10/16
- [Stable-9.1.1 39/49] meson: define qemu_isa_flags, Michael Tokarev, 2024/10/16
- [Stable-9.1.1 40/49] meson: ensure -mcx16 is passed when detecting ATOMIC128,
Michael Tokarev <=
- [Stable-9.1.1 41/49] hw/intc/arm_gicv3: Add cast to match the documentation, Michael Tokarev, 2024/10/16
- [Stable-9.1.1 42/49] hw/intc/arm_gicv3: Add cast to match the documentation, Michael Tokarev, 2024/10/16
- [Stable-9.1.1 43/49] hw/intc/arm_gicv3_cpuif: Add cast to match the documentation, Michael Tokarev, 2024/10/16
- [Stable-9.1.1 44/49] hw/char/pl011: Use correct masks for IBRD and FBRD, Michael Tokarev, 2024/10/16
- [Stable-9.1.1 45/49] hw/audio/hda: free timer on exit, Michael Tokarev, 2024/10/16
- [Stable-9.1.1 46/49] hw/audio/hda: fix memory leak on audio setup, Michael Tokarev, 2024/10/16
- [Stable-9.1.1 47/49] ui/dbus: fix leak on message filtering, Michael Tokarev, 2024/10/16
- [Stable-9.1.1 48/49] ui/win32: fix potential use-after-free with dbus shared memory, Michael Tokarev, 2024/10/16
- [Stable-9.1.1 49/49] ui/dbus: fix filtering all update messages, Michael Tokarev, 2024/10/16
- Re: [Stable-9.1.1 00/49] Patch Round-up for stable 9.1.1, freeze on 2024-10-16 (frozen), Paolo Bonzini, 2024/10/17