[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 1/8] osdep: Avoid using Clang-specific __builtin_available()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 1/8] osdep: Avoid using Clang-specific __builtin_available() |
Date: |
Tue, 15 Feb 2022 18:00:59 +0100 |
Remove the Clang specific __builtin_available() to allow building
with GCC, otherwise we get:
include/qemu/osdep.h: In function 'qemu_thread_jit_write':
include/qemu/osdep.h:787:9: warning: implicit declaration of function
'__builtin_available'; did you mean '__builtin_scalbl'?
[-Wimplicit-function-declaration]
787 | if (__builtin_available(macOS 11.0, *)) {
| ^~~~~~~~~~~~~~~~~~~
| __builtin_scalbl
include/qemu/osdep.h:787:9: warning: nested extern declaration of
'__builtin_available' [-Wnested-externs]
include/qemu/osdep.h:787:29: error: 'macOS' undeclared (first use in this
function)
787 | if (__builtin_available(macOS 11.0, *)) {
| ^~~~~
include/qemu/osdep.h:787:29: note: each undeclared identifier is reported
only once for each function it appears in
include/qemu/osdep.h:787:34: error: expected ')' before numeric constant
787 | if (__builtin_available(macOS 11.0, *)) {
| ~ ^~~~~
| )
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/qemu/osdep.h | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index d1660d67fa..aecd2f66ec 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -777,16 +777,12 @@ size_t qemu_get_host_physmem(void);
MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0
static inline void qemu_thread_jit_execute(void)
{
- if (__builtin_available(macOS 11.0, *)) {
- pthread_jit_write_protect_np(true);
- }
+ pthread_jit_write_protect_np(true);
}
static inline void qemu_thread_jit_write(void)
{
- if (__builtin_available(macOS 11.0, *)) {
- pthread_jit_write_protect_np(false);
- }
+ pthread_jit_write_protect_np(false);
}
#else
static inline void qemu_thread_jit_write(void) {}
--
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é <=
- [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é, 2022/02/15
- 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