[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 40/41] build: Only define OS_OBJECT_USE_OBJC with gcc
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 40/41] build: Only define OS_OBJECT_USE_OBJC with gcc |
Date: |
Thu, 31 Aug 2023 14:56:42 +0200 |
From: Alexander Graf <graf@amazon.com>
Recent versions of macOS use clang instead of gcc. The OS_OBJECT_USE_OBJC
define is only necessary when building with gcc. Let's not define it when
building with clang.
With this patch, I can successfully include GCD headers in QEMU when
building with clang.
Signed-off-by: Alexander Graf <graf@amazon.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-ID: <20230830161425.91946-2-graf@amazon.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index ec14079c67..296f6ef1d2 100644
--- a/meson.build
+++ b/meson.build
@@ -223,7 +223,9 @@ qemu_ldflags = []
if targetos == 'darwin'
# Disable attempts to use ObjectiveC features in os/object.h since they
# won't work when we're compiling with gcc as a C compiler.
- qemu_common_flags += '-DOS_OBJECT_USE_OBJC=0'
+ if compiler.get_id() == 'gcc'
+ qemu_common_flags += '-DOS_OBJECT_USE_OBJC=0'
+ endif
elif targetos == 'solaris'
# needed for CMSG_ macros in sys/socket.h
qemu_common_flags += '-D_XOPEN_SOURCE=600'
--
2.41.0
- [PULL 26/41] hw/i2c: spelling fixes, (continued)
- [PULL 26/41] hw/i2c: spelling fixes, Philippe Mathieu-Daudé, 2023/08/31
- [PULL 27/41] hw/ide: spelling fixes, Philippe Mathieu-Daudé, 2023/08/31
- [PULL 29/41] hw/mips: spelling fixes, Philippe Mathieu-Daudé, 2023/08/31
- [PULL 30/41] hw/sd: spelling fixes, Philippe Mathieu-Daudé, 2023/08/31
- [PULL 31/41] hw/usb: spelling fixes, Philippe Mathieu-Daudé, 2023/08/31
- [PULL 32/41] hw/usb/hcd-xhci: Avoid variable-length array in xhci_get_port_bandwidth(), Philippe Mathieu-Daudé, 2023/08/31
- [PULL 33/41] hw/i386: Remove unuseful kvmclock_create() stub, Philippe Mathieu-Daudé, 2023/08/31
- [PULL 35/41] util/fifo8: Fix typo in fifo8_push_all() description, Philippe Mathieu-Daudé, 2023/08/31
- [PULL 34/41] hw/i386: Rename 'hw/kvm/clock.h' -> 'hw/i386/kvm/clock.h', Philippe Mathieu-Daudé, 2023/08/31
- [PULL 36/41] util: spelling fixes, Philippe Mathieu-Daudé, 2023/08/31
- [PULL 40/41] build: Only define OS_OBJECT_USE_OBJC with gcc,
Philippe Mathieu-Daudé <=
- [PULL 28/41] hw/display: spelling fixes, Philippe Mathieu-Daudé, 2023/08/31
- [PULL 37/41] ui: spelling fixes, Philippe Mathieu-Daudé, 2023/08/31
- [PULL 38/41] docs/style: permit inline loop variables, Philippe Mathieu-Daudé, 2023/08/31
- [PULL 39/41] meson: Fix MESONINTROSPECT parsing, Philippe Mathieu-Daudé, 2023/08/31
- [PULL 41/41] tests/tcg/aarch64: Rename bti-crt.inc.c -> bti-crt.c.inc, Philippe Mathieu-Daudé, 2023/08/31