[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 11/22] configure: Don't use the __atomic_*_16 functions for te
From: |
Alex Bennée |
Subject: |
[PATCH v2 11/22] configure: Don't use the __atomic_*_16 functions for testing 128-bit support |
Date: |
Tue, 23 Mar 2021 16:52:57 +0000 |
From: Thomas Huth <thuth@redhat.com>
The test for 128-bit atomics is causing trouble with FreeBSD 12.2 and
--enable-werror:
cc -Werror -fPIE -DPIE -std=gnu99 -Wall -m64 -mcx16 -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes
-Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes
-fno-strict-aliasing -fno-common -fwrapv -Wold-style-definition -Wtype-limits
-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body
-Wnested-externs -Wendif-labels -Wexpansion-to-defined
-Wno-initializer-overrides -Wno-missing-include-dirs -Wno-shift-negative-value
-Wno-string-plus-int -Wno-typedef-redefinition
-Wno-tautological-type-limit-compare -fstack-protector-strong -o
config-temp/qemu-conf.exe config-temp/qemu-conf.c -pie -Wl,-z,relro -Wl,-z,now
-m64 -fstack-protector-strong
config-temp/qemu-conf.c:4:7: error: implicit declaration of function
'__atomic_load_16' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
y = __atomic_load_16(&x, 0);
^
config-temp/qemu-conf.c:5:3: error: implicit declaration of function
'__atomic_store_16' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
__atomic_store_16(&x, y, 0);
^
config-temp/qemu-conf.c:5:3: note: did you mean '__atomic_load_16'?
config-temp/qemu-conf.c:4:7: note: '__atomic_load_16' declared here
y = __atomic_load_16(&x, 0);
^
config-temp/qemu-conf.c:6:3: error: implicit declaration of function
'__atomic_compare_exchange_16' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
__atomic_compare_exchange_16(&x, &y, x, 0, 0, 0);
^
3 errors generated.
Looking for they way we are using atomic functions in QEMU, we are not
using these functions with the _16 suffix anyway. Switch to the same
functions that we use in the include/qemu/atomic.h header.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210317110512.583747-2-thuth@redhat.com>
Message-Id: <20210320133706.21475-12-alex.bennee@linaro.org>
---
configure | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 61872096a8..69f9f05673 100755
--- a/configure
+++ b/configure
@@ -4779,9 +4779,9 @@ if test "$int128" = "yes"; then
int main(void)
{
unsigned __int128 x = 0, y = 0;
- y = __atomic_load_16(&x, 0);
- __atomic_store_16(&x, y, 0);
- __atomic_compare_exchange_16(&x, &y, x, 0, 0, 0);
+ y = __atomic_load(&x, 0);
+ __atomic_store(&x, y, 0);
+ __atomic_compare_exchange(&x, &y, x, 0, 0, 0);
return 0;
}
EOF
--
2.20.1
- [PATCH v2 05/22] semihosting: move semihosting tests to multiarch, (continued)
- [PATCH v2 05/22] semihosting: move semihosting tests to multiarch, Alex Bennée, 2021/03/23
- [PATCH v2 07/22] semihosting/arm-compat-semi: don't use SET_ARG to report SYS_HEAPINFO, Alex Bennée, 2021/03/23
- [PATCH v2 08/22] linux-user/riscv: initialise the TaskState heap/stack info, Alex Bennée, 2021/03/23
- [PATCH v2 06/22] semihosting/arm-compat-semi: unify GET/SET_ARG helpers, Alex Bennée, 2021/03/23
- [PATCH v2 13/22] utils: Tighter tests for qemu_strtosz, Alex Bennée, 2021/03/23
- [PATCH v2 12/22] cirrus.yml: Update the FreeBSD task to version 12.2, Alex Bennée, 2021/03/23
- [PATCH v2 09/22] tests/tcg: add HeapInfo checking to semihosting test, Alex Bennée, 2021/03/23
- [PATCH v2 11/22] configure: Don't use the __atomic_*_16 functions for testing 128-bit support,
Alex Bennée <=
- [PATCH v2 10/22] gitlab-ci.yml: Merge the trace-backend testing into other jobs, Alex Bennée, 2021/03/23
- [PATCH v2 14/22] utils: Work around mingw strto*l bug with 0x, Alex Bennée, 2021/03/23
- [PATCH v2 21/22] iotests: iothreads need ioeventfd, Alex Bennée, 2021/03/23
- [PATCH v2 17/22] m68k: add the virtio devices aliases, Alex Bennée, 2021/03/23
- [PATCH v2 18/22] blockdev: with -drive if=virtio, use generic virtio-blk, Alex Bennée, 2021/03/23
- [PATCH v2 22/22] gitlab: default to not building the documentation, Alex Bennée, 2021/03/23
- [PATCH v2 20/22] iotests: test m68k with the virt machine, Alex Bennée, 2021/03/23
- [PATCH v2 15/22] gitlab: extend timeouts for CFI builds, Alex Bennée, 2021/03/23
- [PATCH v2 19/22] iotests: Revert "iotests: use -ccw on s390x for 040, 139, and 182", Alex Bennée, 2021/03/23
- [PATCH v2 16/22] qdev: define list of archs with virtio-pci or virtio-ccw, Alex Bennée, 2021/03/23