mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-03-04 17:14:40 -07:00
configure: Define OS_OBJECT_USE_OBJC=0 for MacOSX builds
MacOSX 10.8 ("Mountain Lion") defaults to trying to use automated
reference counting on certain objects. This means that the system
header files will use some Objective C syntax constructs even when
compiling pure C, which confuses mainline gcc. Suppress this by
setting OS_OBJECT_USE_OBJC=0. This avoids a compile error like this:
In file included from
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:5:0,
from /usr/include/os/object.h:74,
from /usr/include/dispatch/dispatch.h:48,
from /System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:56,
from block/raw-posix.c:35:
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:409:1: error: stray ‘@’ in program
[with a large number of further run-on errors]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
bbea405080
commit
a0b7cf6b6e
1 changed files with 3 additions and 0 deletions
3
configure
vendored
3
configure
vendored
|
|
@ -467,6 +467,9 @@ Darwin)
|
|||
audio_possible_drivers="coreaudio sdl fmod"
|
||||
LDFLAGS="-framework CoreFoundation -framework IOKit $LDFLAGS"
|
||||
libs_softmmu="-F/System/Library/Frameworks -framework Cocoa -framework IOKit $libs_softmmu"
|
||||
# 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_CFLAGS="-DOS_OBJECT_USE_OBJC=0 $QEMU_CFLAGS"
|
||||
;;
|
||||
SunOS)
|
||||
solaris="yes"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue