[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 11/14] configure: Don't use the __atomic_*_16 functions for te
From: |
Alex Bennée |
Subject: |
[PATCH v1 11/14] configure: Don't use the __atomic_*_16 functions for testing 128-bit support |
Date: |
Sat, 20 Mar 2021 13:37:03 +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>
Message-Id: <20210317110512.583747-2-thuth@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
configure | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 847bc4d095..1be6bcec0a 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 v1 08/14] linux-user/riscv: initialise the TaskState heap/stack info, (continued)
- [PATCH v1 08/14] linux-user/riscv: initialise the TaskState heap/stack info, Alex Bennée, 2021/03/20
- [PATCH v1 02/14] docs/devel: include the plugin API information from the headers, Alex Bennée, 2021/03/20
- [PATCH v1 05/14] semihosting: move semihosting tests to multiarch, Alex Bennée, 2021/03/20
- [PATCH v1 04/14] tools/virtiofsd: include --socket-group in help, Alex Bennée, 2021/03/20
- [PATCH v1 03/14] docs/devel: expand style section of memory management, Alex Bennée, 2021/03/20
- [PATCH v1 07/14] semihosting/arm-compat-semi: don't use SET_ARG to report SYS_HEAPINFO, Alex Bennée, 2021/03/20
- [PATCH v1 11/14] configure: Don't use the __atomic_*_16 functions for testing 128-bit support,
Alex Bennée <=
- [PATCH v1 10/14] gitlab-ci.yml: Merge the trace-backend testing into other jobs, Alex Bennée, 2021/03/20
- [PATCH v1 06/14] semihosting/arm-compat-semi: unify GET/SET_ARG helpers, Alex Bennée, 2021/03/20
- [PATCH v1 09/14] tests/tcg: add HeapInfo checking to semihosting test, Alex Bennée, 2021/03/20
- [PATCH v1 12/14] cirrus.yml: Update the FreeBSD task to version 12.2, Alex Bennée, 2021/03/20
- [PATCH v1 14/14] utils: Work around mingw strto*l bug with 0x, Alex Bennée, 2021/03/20
- [PATCH v1 13/14] utils: Tighter tests for qemu_strtosz, Alex Bennée, 2021/03/20
- Re: [PATCH for 6.0 v1 00/14] fixes for rc1 (kernel-doc, semihosting, testing), no-reply, 2021/03/20