[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/22] configure: Don't use the __atomic_*_16 functions for testin
From: |
Alex Bennée |
Subject: |
[PULL 11/22] configure: Don't use the __atomic_*_16 functions for testing 128-bit support |
Date: |
Wed, 24 Mar 2021 14:30:10 +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: <20210323165308.15244-12-alex.bennee@linaro.org>
diff --git a/configure b/configure
index edf9dc8985..535e6a9269 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
- [PULL for 6.0 00/22] various fixes (kernel-doc, semihosting, testing), Alex Bennée, 2021/03/24
- [PULL 01/22] scripts/kernel-doc: strip QEMU_ from function definitions, Alex Bennée, 2021/03/24
- [PULL 02/22] docs/devel: include the plugin API information from the headers, Alex Bennée, 2021/03/24
- [PULL 03/22] docs/devel: expand style section of memory management, Alex Bennée, 2021/03/24
- [PULL 04/22] tools/virtiofsd: include --socket-group in help, Alex Bennée, 2021/03/24
- [PULL 07/22] semihosting/arm-compat-semi: don't use SET_ARG to report SYS_HEAPINFO, Alex Bennée, 2021/03/24
- [PULL 05/22] semihosting: move semihosting tests to multiarch, Alex Bennée, 2021/03/24
- [PULL 06/22] semihosting/arm-compat-semi: unify GET/SET_ARG helpers, Alex Bennée, 2021/03/24
- [PULL 11/22] configure: Don't use the __atomic_*_16 functions for testing 128-bit support,
Alex Bennée <=
- [PULL 13/22] utils: Tighter tests for qemu_strtosz, Alex Bennée, 2021/03/24
- [PULL 10/22] gitlab-ci.yml: Merge the trace-backend testing into other jobs, Alex Bennée, 2021/03/24
- [PULL 08/22] linux-user/riscv: initialise the TaskState heap/stack info, Alex Bennée, 2021/03/24
- [PULL 14/22] utils: Work around mingw strto*l bug with 0x, Alex Bennée, 2021/03/24
- [PULL 12/22] cirrus.yml: Update the FreeBSD task to version 12.2, Alex Bennée, 2021/03/24
- [PULL 09/22] tests/tcg: add HeapInfo checking to semihosting test, Alex Bennée, 2021/03/24
- [PULL 18/22] blockdev: with -drive if=virtio, use generic virtio-blk, Alex Bennée, 2021/03/24
- [PULL 20/22] iotests: test m68k with the virt machine, Alex Bennée, 2021/03/24
- [PULL 16/22] qdev: define list of archs with virtio-pci or virtio-ccw, Alex Bennée, 2021/03/24
- [PULL 19/22] iotests: Revert "iotests: use -ccw on s390x for 040, 139, and 182", Alex Bennée, 2021/03/24