From mboxrd@z Thu Jan 1 00:00:00 1970 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 E1D6BC433EF for ; Wed, 16 Mar 2022 19:25:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1A5FC83CC8; Wed, 16 Mar 2022 20:24:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="VDWnhZAo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2210C83CB4; Wed, 16 Mar 2022 20:24:06 +0100 (CET) Received: from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com [IPv6:2607:f8b0:4864:20::e29]) (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 D11B583C67 for ; Wed, 16 Mar 2022 20:23:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-vs1-xe29.google.com with SMTP id y20so3301122vsy.2 for ; Wed, 16 Mar 2022 12:23:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=RMWkpU5aYmTkaUdY6GUvxn6w2b8mfzdv65+w0hrN0mI=; b=VDWnhZAopFmHXhk7mVDffr6pTYPNdLiKBAOG9nP0+Rt6CctSB1CyDETMzM1mf6Uh6m bZYsBp74sngMEjSzrSWiyLfuiHG8pWGGmu3X3G0zQ03UXf3IrfC03kT+yUm3xCJC9jaH popRBHoWs+a2JkZshJ6QtV4WAPB0t9+xp6Sls= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=RMWkpU5aYmTkaUdY6GUvxn6w2b8mfzdv65+w0hrN0mI=; b=NzfBxN5InzGDc/TJ3RGJ4DSdY/rPhbiNF+QSsUvyeH1b7PKxCnCsMR7/YcyT1Wlcmv hBxe6tkg4pT0xfbE2XmBqvYDR1p93mbxdjLxX+h/Y5nolBvJ1sJ0wfEzxW6hnsuU/ECz 93MEaCwJkAZEfoetVCIA2VIZXZjZuJGCg9e57IjgH+3dAIuZBFRwg8NIMFtcAu1iAdzj Zd4MyZuFMa1QH6yuSlWqA3L3Y6b4RGrDjdIUrvmC2oXqjvM0Z3IlGAufl+jmqTMDaseS XoPZx4bU5F2/k4xKgIAHCknb/cp+63HHxzkHKY/VsE6bghD/25GZb6Vgk6ks2u30nTLe oMJA== X-Gm-Message-State: AOAM532kPx3AUw2bJwtxeqB2qx9DfCTEMhUdMz7dhWUSYJ7jp1aTWUao LksmJT0fsNVs0YyKGZI8gNDwCNLbVLhzY0Uoa2A9IetHy5SDNH/U X-Google-Smtp-Source: ABdhPJx6jzC2kkKfrpUS0qqk9Uxq6rXDscBCkhOofjk0rGVdPU+Oj+BFQXKS4cqCC02rjkOcscxSky1BPvEtC97VsiQ= X-Received: by 2002:a67:1a02:0:b0:320:a51f:8067 with SMTP id a2-20020a671a02000000b00320a51f8067mr537468vsa.38.1647458636406; Wed, 16 Mar 2022 12:23:56 -0700 (PDT) MIME-Version: 1.0 References: <20220316153948.197650-1-ptosi@google.com> <20220316153948.197650-3-ptosi@google.com> In-Reply-To: <20220316153948.197650-3-ptosi@google.com> From: Simon Glass Date: Wed, 16 Mar 2022 13:23:43 -0600 Message-ID: Subject: Re: [PATCH 3/9] scripts: Makefile.lib: Pass __UBOOT__ to DTC's CPP To: =?UTF-8?Q?Pierre=2DCl=C3=A9ment_Tosi?= Cc: U-Boot Mailing List 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 Hi Pierre-Cl=C3=A9ment, On Wed, 16 Mar 2022 at 09:40, Pierre-Cl=C3=A9ment Tosi w= rote: > > 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. Can you give an example of such a situation? > > Signed-off-by: Pierre-Cl=C3=A9ment Tosi > Cc: Simon Glass > --- > scripts/Makefile.lib | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Simon Glass > > 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 -nostdi= nc \ > -I$(srctree)/arch/$(ARCH)/include = \ > -include $(srctree)/include/linux/kconfig.h = \ > -D__ASSEMBLY__ = \ > + -D__UBOOT__ = \ > -undef -D__DTS__ > > # Finds the multi-part object the current object will be linked into > -- > 2.35.1.723.g4982287a31-goog >