From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::244; helo=mail-wr0-x244.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BFAF02235228C for ; Tue, 27 Feb 2018 11:55:05 -0800 (PST) Received: by mail-wr0-x244.google.com with SMTP id n7so45320wrn.5 for ; Tue, 27 Feb 2018 12:01:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OV/Kib1epwQRbLZ6JO/e36kJQmOEqpmm7M/5AnEGMmE=; b=ImRgPMliQ9SkWl7ze1r9NRbuyM8+e6gj9PJK7mjkRyv687f5CwC73VNllAEQW2eFf5 hlizRtxngh/RaLBwMJRBnMfj4e9XYIXXqvI8HfXhNlk6Syi0NPAyq3nHP6OMRGK5Ka/C rywJaYyyLXy6PXTQwaqU9QvtLYVvUG86nFEpI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=OV/Kib1epwQRbLZ6JO/e36kJQmOEqpmm7M/5AnEGMmE=; b=JTG5/YOZwW2uPwdAo9fmYSiSY2UWgf3bgitQvYdfVf6R4iBwUsrXjLjEDuQVykEN1H wxbR3itTzOfYqmkL5FW9vrompIidC9m2v6VgCuUvgVjuJayWlIgJNKtxUFJZS26aE3gt m+0CD9BrGhhl3k5SRbAlX2+7z4UJZuxwCqDhaNOH1gcft04sth5ArpoVBwp7aQYO5vTF a1uLNW12FLivO0R5ctfTuCl5r+dqDNqIlOQTeMWxGxmHHE8ai38f5u1RsYiTOTqDVWHd xNcVhgGXoTJY5P65FZZNT3TxApeZm2JTvUfRaPlKxt3cNDTZfbPeQcmSYDgkLVkJa14F w0Eg== X-Gm-Message-State: APf1xPD+X1e6Ev2V24NkhtOjpwE8Dd0QPRbk3PivfPi58IPDRX8glry7 /IHj6eBPxUzVCizWwtiZDazsxg== X-Google-Smtp-Source: AH8x225doCtWSpyW7AXLnAjd+q4MFJoFoUFCmtynhO3mH66/Di6X/+yJMewEhAoZloTqnvRli0PbcQ== X-Received: by 10.223.208.198 with SMTP id z6mr15211108wrh.15.1519761670324; Tue, 27 Feb 2018 12:01:10 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id s2sm15830177wmf.0.2018.02.27.12.01.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Feb 2018 12:01:08 -0800 (PST) Date: Tue, 27 Feb 2018 20:01:07 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: "edk2-devel@lists.01.org" , "Gao, Liming" , "Zhu, Yonghong" Message-ID: <20180227200107.6degkvddcd46dlba@bivouac.eciton.net> References: <20180227175132.1607-1-ard.biesheuvel@linaro.org> <20180227183327.lg6juoabvbc3jute@bivouac.eciton.net> <20180227185801.6d7mgbkaqtxppcid@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH] BaseTools/tools_def: use separate PP definition for DTC X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2018 19:55:06 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Feb 27, 2018 at 07:02:06PM +0000, Ard Biesheuvel wrote: > On 27 February 2018 at 18:58, Leif Lindholm wrote: > > On Tue, Feb 27, 2018 at 06:36:08PM +0000, Ard Biesheuvel wrote: > >> On 27 February 2018 at 18:33, Leif Lindholm wrote: > >> > On Tue, Feb 27, 2018 at 05:51:32PM +0000, Ard Biesheuvel wrote: > >> >> Clang's preprocessor behaves differently from GCC's, and produces > >> >> intermediate device tree source that still contains #pragma pack() > >> >> and other directives that the device tree compiler chokes on. > >> >> > >> >> For assembling device tree sources, it matters very little which > >> >> preprocessor is being used, so let's just use GNU CPP explicitly. > >> > > >> > Ah, right, same fundamental issue as > >> > 5b8766bb92debfa7b2f45a4a6d683b4227360d66. > >> > >> Yes, and I fail to see why changing just those two files makes a > >> meaningful difference. > > > > Probably because Secure96Dxe.inf has a lot more [Packages] and > > [LibraryClasses] dependencies than DeveloperBox.inf. > > > > This patch would undoubtedly also have resolved that issue. > > (As would clang preprocessor not throwing out C syntax when explicitly > > asked to provide asm.) > > > >> > However, this time triggered by autogen seemingly forcing inclusion of > >> > lots of central header files that are not even used, like > >> > MdePkg/Include/IndustryStandard/Bluetooth.h > >> > MdePkg/Include/IndustryStandard/Acpi10.h > >> > and so on. > >> > > >> > Is there any way to suppress these implicit includes from .dts > >> > processing? > >> > >> There is 'Trim', which can filter #include'd content, but using that > >> also robs us of the ability to #include .dtsi files, which was kind of > >> the point of using the preprocessor in the first place. > > > > Yeah, that'd definitely be missing the point slightly. > > > > I was thinking more along the lines of either excluding the autogen > > bits from the preprocessing or using a separate .inf for the .dts. > > > > We need the AutoGen.h bits for the fixed PCD values, which was the > other reason for using the preprocessor in the first place. Yeah, I was afraid of that. > Separate .inf would mean registering file GUIDs in the package .DEC, > so that the driver can find the binary image at runtime, which is what > I was trying to get away from by pulling it into the driver, > especially because we are dealing with overlay DT snippets, of which > there may be many, rather than a single DT (with a well known file > GUID) for the entire platform. > > > If neither of those feels practical, the proposed patch is fine. > > It just feels a little bit clunky. > > Yeah, I don't see any unclunky solutions, unfortunately. Fair enough. Reviewed-by: Leif Lindholm