• Peter Maydell's avatar
    Support using a different compiler for Objective-C files · 3c4a4d0d
    Peter Maydell authored
    
    
    MacOSX 10.8 ("Mountain Lion") requires us to compile our one
    Objective-C source file with clang even if the rest of QEMU
    requires a real gcc, because the system headers we use make
    use of Apple's "Blocks" extension to C/ObjC, and mainline
    gcc doesn't support that. Since we only need to use a true
    gcc for the parts of QEMU that use the fixed-register
    env variable, we can simply use clang to build the ObjC
    file: it will link to the gcc-built objects with no problems.
    
    Add the necessary support for an OBJCC variable in the
    makefile and configure machinery; we default to clang
    if we have it, otherwise whatever CC is (since gcc
    might be the Apple gcc which does support Blocks).
    
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    3c4a4d0d