Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6F88FC433EF for ; Wed, 16 Mar 2022 15:40:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9512183C9E; Wed, 16 Mar 2022 16:40:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="lnxXkL2u"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 036DD80F78; Wed, 16 Mar 2022 16:40:51 +0100 (CET) Received: from mail-wm1-x34a.google.com (mail-wm1-x34a.google.com [IPv6:2a00:1450:4864:20::34a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 070F982065 for ; Wed, 16 Mar 2022 16:40:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=3_AQyYgUKBuUWaVZPNVVNSL.JVTb-IVVaSPZaZ.KLUe.KL@flex--ptosi.bounces.google.com Received: by mail-wm1-x34a.google.com with SMTP id j42-20020a05600c1c2a00b00381febe402eso2942030wms.0 for ; Wed, 16 Mar 2022 08:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc:content-transfer-encoding; bh=YjHIex6Zypfcib1YM1ewuRP4u9Kaug/asxD6gcqO5TY=; b=lnxXkL2uIt4Lk4O+dDfyS3KsH931CXX8/fNUGZcJSHC+44+WAB7CbTT+/eEPX3DHgV sMI5h0OVTt6beJ9/Oh2O7DXjnepw57a7ONN7xYy0j1eTAO1FtNHKXB0Kjlnw3vA+JjpP ZNRQ5scFBbzojP+vTPQiZqpjYQokL4BEZrv92f5LlMvyZr1tyShHE6Abv/7FEMbbFbqo wAs8oPrhnSLWG22SJOeEp7pA+yxcUJtKMG1hmZ5gtTr/y3gY9vHurE1vKCbuBTWCMetj 7NT1vcgyIdwD+Uc2EhiZE/gDgNRaTLz6tx0g/mu/i79wxwrNOhUoWDnfgVm7tOb5usIq IjVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc:content-transfer-encoding; bh=YjHIex6Zypfcib1YM1ewuRP4u9Kaug/asxD6gcqO5TY=; b=DbOp4fjf2zAyoEIavkTWkMuoBrNbS12S7UlaBekS6zEItMTjQxGtCrckv5qQAFdkcg o5lfKVbYaVSeW0f6Zkgze2Fxl9NWmytGZHxz0+039UcmRLQkum47kyK4ZxZxnqbS5HBX 5B8k93ZL0XIshHijH2zESCQ098hHDJs1lPScGD2NPiBKa/UlZm1fh+DLpfsIZDy/HdFe fmPO8jd23TjV04fNO8du2LcLo/OU0VbpIs6m4sDp2Vg6WVZ5qGP2+TTNef5EWnZs3vwC VU5nWXaDpWbOb+BtETvDbpG5hXIsc0CYl00J9kmrsKRShuP7gnNNczNAdHmO9G+s+J+G Q5bA== X-Gm-Message-State: AOAM532yBHxg5mB9ZkDRiNBE+P5Dfpnzi6II2qergOktkfkPChYd2NXb 90pIJ6OEhHPaASCzcZVtHi1XX21flNm6jAvKmTEkxc5o9Jq2gF/c4rXZCTxZt6tNnHhwXn09aFd 7UXwTQ2QtSBS9i/C0JLBoUMdlRORZ9cgDlehbRkmtf7zIweISXrHTMda2 X-Google-Smtp-Source: ABdhPJydXtMHKXnRoa0DLwiP/GMZ3YioINBpXSo/NGrOSi+7uzpI6aCetRiwkj0OomzI4sOcygRY8bG3/Q== X-Received: from ptosi1.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:afb]) (user=ptosi job=sendgmr) by 2002:a5d:6c69:0:b0:203:78af:48b2 with SMTP id r9-20020a5d6c69000000b0020378af48b2mr418282wrz.123.1647445244359; Wed, 16 Mar 2022 08:40:44 -0700 (PDT) Date: Wed, 16 Mar 2022 15:39:42 +0000 In-Reply-To: <20220316153948.197650-1-ptosi@google.com> Message-Id: <20220316153948.197650-3-ptosi@google.com> Mime-Version: 1.0 References: <20220316153948.197650-1-ptosi@google.com> X-Mailer: git-send-email 2.35.1.723.g4982287a31-goog Subject: [PATCH 3/9] scripts: Makefile.lib: Pass __UBOOT__ to DTC's CPP From: "=?UTF-8?q?Pierre-Cl=C3=A9ment=20Tosi?=" To: u-boot@lists.denx.de Cc: "=?UTF-8?q?Pierre-Cl=C3=A9ment=20Tosi?=" , Simon Glass Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Some headers included (possibly indirectly) from .dts files might have U-Boot specific content relying on the __UBOOT__ macro passed to CPP when building C code. In that case, it would be sensible for DTC to see that content instead of the non-U-Boot one. To do so, pass the macro to the pre-processor when generate DTC inputs. Signed-off-by: Pierre-Cl=C3=A9ment Tosi Cc: Simon Glass --- scripts/Makefile.lib | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index c14da10de7..d7b548dce8 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -192,6 +192,7 @@ dtc_cpp_flags =3D -Wp,-MD,$(depfile).pre.tmp -nostdinc= \ -I$(srctree)/arch/$(ARCH)/include \ -include $(srctree)/include/linux/kconfig.h \ -D__ASSEMBLY__ \ + -D__UBOOT__ \ -undef -D__DTS__ =20 # Finds the multi-part object the current object will be linked into --=20 2.35.1.723.g4982287a31-goog