Skip to contentSkip to conversation

Cocoa patches for 1.0

PATCH Superseded Andreas Färber 2 participants 4 messages Oct 31, 2011

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Cocoa patches for 1.0

[Seems they didn't make it to the list yesterday]

Hello,

Here's two Cocoa patches I'd like to see pulled into 1.0. First, documenting the de facto maintainer. Second, fixing the build.

Since qemu-system-* crashes after selecting an image file, I can only say that Juan's sheet patch compiles and would like to postpone it until it actually makes a difference. Unless Juan or someone has a use case that works on master.

Regards,
Andreas

Cc Juan Pineda <[email protected]>

Andreas Färber (2):
MAINTAINERS: Add Cocoa maintainer
softfloat: Avoid uint16 type conflict on Darwin

 MAINTAINERS     |    5 +++++
 fpu/softfloat.h |    3 +++
 2 files changed, 8 insertions(+), 0 deletions(-)
#1 lore raw

PATCH 1/2 MAINTAINERS: Add Cocoa maintainer

Degrade cocoa.m from Maintained to Odd Fixes.

---
 MAINTAINERS |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
MAINTAINERS +5 -0
index 2b4c5d7..c08951c 100644
@@ -446,6 +446,11 @@ M: Anthony Liguori <[email protected]>
 S: Maintained
 F: ui/
 
+Cocoa graphics
+M: Andreas Färber <[email protected]>
+S: Odd Fixes
+F: ui/cocoa.m
+
 Main loop
 M: Anthony Liguori <[email protected]>
 S: Supported
Signature · 1 line
1.7.0.3
#2 lore raw

PATCH 2/2 softfloat: Avoid uint16 type conflict on Darwin

In reply to Andreas Färber

In file included from ./bswap.h:7,

                 from ./qemu-common.h:106,
                 from ./qemu-aio.h:17,
                 from ./Block.h:4,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:28,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:218,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
                 from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
                 from /System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:17,
                 from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:81,
                 from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
                 from ui/cocoa.m:25:

/Users/andreas/QEMU/qemu/fpu/softfloat.h:60: error: conflicting types for ‘uint16’ /System/Library/Frameworks/Security.framework/Headers/cssmconfig.h:73: error: previous declaration of ‘uint16’ was here
make: *** [ui/cocoa.o] Error 1

Apple's FSEvents.h has #include <Block.h>, which wants /usr/include/Block.h but due to case-insensitive file system and include path jungle gets QEMU's ./block.h, which in turn includes softfloat.h indirectly.

Therefore work around the conflict in softfloat.h itself by renaming specifically uint16 on Darwin to qemu_uint16. This fixes the build until we have a more general solution.

Cc Juan Pineda <[email protected]>
Cc Peter Maydell <[email protected]>
---
 fpu/softfloat.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
fpu/softfloat.h +3 -0
index 07c2929..5320945 100644
@@ -54,6 +54,9 @@ these four paragraphs for those parts of this code that are retained.
 | to the same as `int'.
 *----------------------------------------------------------------------------*/
 typedef uint8_t flag;
+#ifdef __APPLE__
+#define uint16 qemu_uint16
+#endif
 typedef uint8_t uint8;
 typedef int8_t int8;
 #ifndef _AIX
Signature · 1 line
1.7.0.3
#3 lore raw
In reply to Andreas Färber

Hi Andreas,

I just verified my cocoa.m patch under the master branch. Three things I needed to get the master branch to work under OSX:

1) Need to apply your softfpu.h patch
2) Need to configure using non LLVM gcc and disable broken user builds under OSX: "--disable-user --cc=gcc-4.2 --host-cc=gcc-4.2"
3) Need to comment out line 2188 in vlc.c to avoid the GThread error that has cropped up since 0.15.1

With those three changes qemu-i386 will run under OSX. That allowed me to run and verify my cocoa.m patch under the current master branch. Hope that helps.

On another note: the Apple default LLVM gcc will not work with QEMU. Compile will succeed, but qemu seg faults when run. GDB doesn't help figure it out (at my level of expertise with QEMU) because the stack is incomplete.

Thanks!
-Juan

Quoted 26 lines · Andreas Färber

[Seems they didn't make it to the list yesterday]

Hello,

Here's two Cocoa patches I'd like to see pulled into 1.0. First, documenting the de facto maintainer. Second, fixing the build.

Since qemu-system-* crashes after selecting an image file, I can only say that Juan's sheet patch compiles and would like to postpone it until it actually makes a difference. Unless Juan or someone has a use case that works on master.

Regards,
Andreas

Cc Juan Pineda <[email protected]>

Andreas Färber (2):
MAINTAINERS: Add Cocoa maintainer
softfloat: Avoid uint16 type conflict on Darwin

MAINTAINERS     |    5 +++++
fpu/softfloat.h |    3 +++
2 files changed, 8 insertions(+), 0 deletions(-)