Received: by 2002:a17:907:76f8:b0:9a1:fa4e:495e with SMTP id kg24csp5081858ejc; Thu, 31 Aug 2023 06:09:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1+FkNwpqHhiM5TTpW0vlQAPoZnjp6UN6HYfnrqaOkNj4Zcc6b0xy6+81PA5kXPsXEGIDV X-Received: by 2002:ac8:5cce:0:b0:412:fa6:56f8 with SMTP id s14-20020ac85cce000000b004120fa656f8mr2980916qta.12.1693487392312; Thu, 31 Aug 2023 06:09:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693487392; cv=none; d=google.com; s=arc-20160816; b=jjPWGEXkF+BFMGnr+tKw1+wws7Q617jXwFhMUWsoE9iNHvj0Gxos0o3oiMwYyTdG31 mBLaoXMHH3OCIwZtNszU/YwNZ8kW1MAd5vikuXD5ik/59oXy/aNaBexkKCweMdW9m7J0 /1QraRhKYi0Fw9cVTSxnkWSYHa/mfzPzuJXerL/8hZZKzGV5U5Uywkab/Fa57R5FqDcd Z+P5KiBpgqL38aB/Cq2H7KY9+EOyO7QuDfBiCPn/vtcL39Wn5g8ic8d78EOgj+EJC9CZ Eqou42iFe0uLCY+HoGxakxAQZQK3KDsM824wIHjnOrU3Io2Q9BiT/eOQjTGRqu3D67Km SMgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3i3x9Dz9RPQMfZg42SaVktArQRa8La0Ylbd8e6a9o0U=; fh=Zi2LYiqSYi41O7DQODJE/V0T01GGcAhs5Ap8S1dueuc=; b=sMyFCFpFUyRiSyLFhto8C8Hdb34VjYPbgSTRQvhDupdAFusgVMhZ0FkeLWCqETT9cF v9NSf4xHxOpFGKE6UmP7u+f8yMy1Yf+Gznt8PhlkwU35ZsuC7rXigNBccjFk24aIr6jK NwXD7q/3Q17p4OWZA2VsYb/O9bQLq9m7trNmfbenW0RuKAgbOQyD2A6vVvCvOY/dfrWP 2d6jaLoJ4CAlcoWR5cAlD9eoSQSnx+avDHt/8l0UWZsB5wF3nUZuYN4Pn+GXWQDAkO75 4sr/rQugGXRjo4iGvy71SUuZFe/SYuH4oIC3+JvUkS8QewSxHp0fCq4SxnGBMGIVrQJY NqTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zEH0iJL+; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 3-20020ac85743000000b00403cecf15c5si831641qtx.329.2023.08.31.06.09.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 06:09:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zEH0iJL+; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbhLT-0008BO-MR; Thu, 31 Aug 2023 09:04:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbhI8-0000cB-8i for qemu-devel@nongnu.org; Thu, 31 Aug 2023 09:00:56 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbhI3-0006sf-A1 for qemu-devel@nongnu.org; Thu, 31 Aug 2023 09:00:55 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-401d6f6b2e0so12599255e9.1 for ; Thu, 31 Aug 2023 06:00:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693486849; x=1694091649; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3i3x9Dz9RPQMfZg42SaVktArQRa8La0Ylbd8e6a9o0U=; b=zEH0iJL+V+rjDrfQxhE5J2nzbDpkMrjFG3D0pu7MwPtKl6ZYCFrmVBc64exOSzoluB yfMsgWGOpMLdkQEkrrA9Oce8Ohn9eWbOt+Dhpn1DrYVdAuuAZ0h22ZgXHtTWsKDhwCHC OLZ9EK520G953eDL0NPCYG0JApVmtXqA7bElZj6GE/0kZIX8y/il0qr9t3pHmFiIVfuO jKFh+s/+pUvBVK9LpTamlM2lJeIa/GQAD3F9zHuiQd35hRl4Maml+ioZ0WotHZG4pkrQ j2DiEpjgiOM1kC/HBo9VuwFTFPq6yxvlsi7o6hrXx93z3m1ab3fmNqt1s76P/5LcGumR hC8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693486849; x=1694091649; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3i3x9Dz9RPQMfZg42SaVktArQRa8La0Ylbd8e6a9o0U=; b=Kro5ZlXuvsOHVjlzAMM3RgybDmUEBVTD0iGlnL8XeJiT+jFlsPAKAsP7XjoLcl+F0j jj4zfyaPV8LYCFKLKjuNo/vgYqMwfpzWe0T4eLFknkpETYv1wfLgnMmL4ilv6gTIqPgS g08m5xZIW4J4dNLcdNZK+KF5IosWRQmBE03jVxaf5ZLPbrS2BGFPkolnq7Z/up74H4z2 T4X6qo+SIH9zowgOHwGmPf7vtaIydo7cIQInDRE7pbTtyjUDikl6PpyrzcLA2/hXkQav gc/39QI2Qpq6L2yj2F2bgt4kg7tUc4rFDMgK2eMFf5rin28Ga9vyLXHtbbsAMCv3VzFt 3XFg== X-Gm-Message-State: AOJu0YyHvzbXjC62+3MJKJqlzZ9oAtDvWJU2zi02q6LHYS4k4qt0oVZK wg8JQQC4EJvHCSQvDEHmeLczaRSTClw6q8Kb7os= X-Received: by 2002:a1c:720e:0:b0:400:5962:6aa9 with SMTP id n14-20020a1c720e000000b0040059626aa9mr2085595wmc.11.1693486848995; Thu, 31 Aug 2023 06:00:48 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id q12-20020adffecc000000b00316eb7770b8sm2197901wrs.5.2023.08.31.06.00.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 06:00:48 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-block@nongnu.org, Alexander Graf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Akihiko Odaki , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth Subject: [PULL 40/41] build: Only define OS_OBJECT_USE_OBJC with gcc Date: Thu, 31 Aug 2023 14:56:42 +0200 Message-ID: <20230831125646.67855-41-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831125646.67855-1-philmd@linaro.org> References: <20230831125646.67855-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: /vd9c+gSj5pe From: Alexander Graf 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Akihiko Odaki Message-ID: <20230830161425.91946-2-graf@amazon.com> Signed-off-by: Philippe Mathieu-Daudé --- 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