[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64 |
Date: |
Tue, 15 Feb 2022 18:01:02 +0100 |
GCC 10.1 introduced the -moutline-atomics option on Aarch64.
This options is enabled by default, and triggers a link failure:
Undefined symbols for architecture arm64:
"___aarch64_cas1_acq_rel", referenced from:
_qmp_migrate_recover in migration_migration.c.o
_cpu_atomic_cmpxchgb_mmu in accel_tcg_cputlb.c.o
_cpu_atomic_fetch_sminb_mmu in accel_tcg_cputlb.c.o
_cpu_atomic_fetch_uminb_mmu in accel_tcg_cputlb.c.o
_cpu_atomic_fetch_smaxb_mmu in accel_tcg_cputlb.c.o
_cpu_atomic_fetch_umaxb_mmu in accel_tcg_cputlb.c.o
_cpu_atomic_smin_fetchb_mmu in accel_tcg_cputlb.c.o
...
"___aarch64_ldadd4_acq_rel", referenced from:
_multifd_recv_new_channel in migration_multifd.c.o
_monitor_event in monitor_hmp.c.o
_handle_hmp_command in monitor_hmp.c.o
_colo_compare_finalize in net_colo-compare.c.o
_flatview_unref in softmmu_memory.c.o
_virtio_scsi_hotunplug in hw_scsi_virtio-scsi.c.o
_tcg_register_thread in tcg_tcg.c.o
...
"___aarch64_swp4_acq", referenced from:
_qemu_spin_lock in softmmu_cpu-timers.c.o
_cpu_get_ticks in softmmu_cpu-timers.c.o
_qemu_spin_lock in softmmu_icount.c.o
_cpu_exec in accel_tcg_cpu-exec.c.o
_page_flush_tb_1.isra.0 in accel_tcg_translate-all.c.o
_page_entry_lock in accel_tcg_translate-all.c.o
_do_tb_phys_invalidate in accel_tcg_translate-all.c.o
...
QEMU implements its own atomic operations using C11 builtin helpers.
Disable the GCC out-of-line atomic ops.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Clearly out of my understanding, but at least it links and the qtests
pass.
---
configure | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/configure b/configure
index 06c03cebd3..3217aa22cb 100755
--- a/configure
+++ b/configure
@@ -2826,6 +2826,18 @@ else
avx512f_opt="no"
fi
+#########################################
+# Disable out-of-line atomic operations.
+
+case "$cpu" in
+ aarch64)
+ write_c_skeleton;
+ if compile_prog "$CPU_CFLAGS -Werror -mno-outline-atomics" "" ; then
+ CPU_CFLAGS="-mno-outline-atomics $CPU_CFLAGS"
+ fi
+ ;;
+esac
+
########################################
# check if __[u]int128_t is usable.
--
2.34.1
- [PATCH v2 0/8] buildsys: More fixes to use GCC on macOS, Philippe Mathieu-Daudé, 2022/02/15
- [PATCH v2 1/8] osdep: Avoid using Clang-specific __builtin_available(), Philippe Mathieu-Daudé, 2022/02/15
- [PATCH v2 3/8] meson: Resolve the entitlement.sh script once for good, Philippe Mathieu-Daudé, 2022/02/15
- [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64,
Philippe Mathieu-Daudé <=
- Re: [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64, Akihiko Odaki, 2022/02/15
- Re: [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64, Richard Henderson, 2022/02/16
- Re: [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64, Philippe Mathieu-Daudé, 2022/02/16
- Re: [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64, Akihiko Odaki, 2022/02/16
- Re: [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64, Philippe Mathieu-Daudé, 2022/02/16
- Re: [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64, Peter Maydell, 2022/02/16
- Re: [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64, Richard Henderson, 2022/02/17
- Re: [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64, Paolo Bonzini, 2022/02/18
Re: [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64, Paolo Bonzini, 2022/02/18
[PATCH v2 2/8] osdep: Ignore 'unguarded-availability-new' warnings on macOS Catalina, Philippe Mathieu-Daudé, 2022/02/15