From patchwork Thu Aug 31 12:56:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 718992 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp461633wrn; Thu, 31 Aug 2023 06:09:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEXTGBJETUeyImFzWLkjcEVmtg8qQpgHFk4HzaIXvPiPiiToJoT8bZ7vL6h/bHJjC8SzIiH X-Received: by 2002:a05:6214:29cb:b0:62f:f6ed:857e with SMTP id gh11-20020a05621429cb00b0062ff6ed857emr3626103qvb.55.1693487392104; 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=HJf3n8ykS6/AV6tAKKmbdL8FqzXjpCSNHmi08bDLui2HWK/CnDOc6rx0t/GjvQRAE1 6n4mKCNMJek70lPyt9suEK/EwUZHivYXULPucQ92bB2Kx5+Cxb4fqI8g6pcYuICV3i9X o98yMbgzV+Uhxwwbj6kY2noU+OU6AoIz+Amb8E/edreT3dQJoJyiqIsSkW0ocvmw48Fg bNBtTKT+jWSb1o9MdvYeM8HEuIODUggqEeRofshBEd6VRfNhSD2ht0bxgXIhxWaXgQnQ G8axuUhjgcRP9vcFQqvmhBUoSKLc57nHgK/pNV36/AGf9nv2o1vHejEzPBj87n1BRosb 2z4A== 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=ZB+6Z+g7BhwYEOzCMOPHmoPPEKN3EIGzGZb/6p5YZOMmAkI1i07D7rsfXXfl52hyqC jHyBZ+iIeU+C1G3q5DhzqnSphLlDW+NlclVGHyFiE4NnUxXxkIQnwijyeadVjllXfN/M sSAVzqCjb0TpsANMNsEqe/rHyPt3zypmD3D+6DJktis2qe4jdQdHAHqK8dMmYKl89Wj9 rLrcWluyWMO7K+T5A83Lu0eCuFJL72tTQv7yn8Ion4VN43RTofVSw83HtVoAy8mikInC Xt13QPy+52zKfTgZ+xgPC/WTv0LUfPaqZqUJgGIWfoSZTZOKP41TNtHzooMS3fbRZuzC +h9A== 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+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=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 v7-20020a0cdd87000000b006516bcc7780si858771qvk.347.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+patch=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+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=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_Mathieu-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_Mathieu-Daud=C3=A9?= , Akihiko Odaki , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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'