From patchwork Sat Aug 11 21:34:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 10694 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DEE3B23E53 for ; Sat, 11 Aug 2012 21:34:50 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by fiordland.canonical.com (Postfix) with ESMTP id A1FDBA18DDE for ; Sat, 11 Aug 2012 21:34:50 +0000 (UTC) Received: by obceq6 with SMTP id eq6so2997703obc.11 for ; Sat, 11 Aug 2012 14:34:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=ywPiO9sq+qUrzdSzAo9DM24naZJOygi2eUDk5K1R+Fc=; b=Yy56ZaGY5QCtJilcaS8Kbs2/iRiPXI4OdZ767avoTXmszOP+GafOPtvSzQN6ZFmu4W ho8ByFGVgWrEMEp8m8BaATSR1yGm3nA73vKHIQXi3xY5iBIAonB53KaFn2FpI/P9LeCR GozFAb+0v2cYPbvy4f+JGZP66DwjrmL1U683ZyE2ehPLAmVaV9MdjqvGaTJ5ITN20v4W //VgvpRwNgeJ/njwoAaQfDy/eE0yNo4iU63M9NYce5vE0kqEpVeBTcVp6GoNc/DEMyf2 ExQSVpV+D77BdzWq7KIXiVCQaXXYpNjyhgVfMofmH3H9qBY2USERma9ikef4/3H35UsI 6EYA== Received: by 10.50.6.229 with SMTP id e5mr1818496iga.9.1344720885807; Sat, 11 Aug 2012 14:34:45 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.200 with SMTP id ew8csp117807igc; Sat, 11 Aug 2012 14:34:44 -0700 (PDT) Received: by 10.204.149.86 with SMTP id s22mr2593681bkv.1.1344720884066; Sat, 11 Aug 2012 14:34:44 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id ha10si2302649bkc.103.2012.08.11.14.34.43 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 11 Aug 2012 14:34:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1T0JKS-000702-V2; Sat, 11 Aug 2012 22:34:40 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [PATCH 1/2] configure: Define OS_OBJECT_USE_OBJC=0 for MacOSX builds Date: Sat, 11 Aug 2012 22:34:39 +0100 Message-Id: <1344720880-26881-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1344720880-26881-1-git-send-email-peter.maydell@linaro.org> References: <1344720880-26881-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQmhatdBIQAFwbGN+KsXiO/y7Wa2BUsDrf9UQtSQEeP+4DkIuSht8rMzjcB8ySe0bhmfd/CZ 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 --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index f0dbc03..be4a2bb 100755 --- a/configure +++ b/configure @@ -452,6 +452,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"