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:c09::243; helo=mail-wm0-x243.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (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 99F282034D8D3 for ; Tue, 27 Feb 2018 10:51:59 -0800 (PST) Received: by mail-wm0-x243.google.com with SMTP id t74so554562wme.3 for ; Tue, 27 Feb 2018 10:58:05 -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=81SKuTdyEYpjYRBzJuJoTcO2tMHpG0vD2hLGJYOxVsA=; b=e3mOu23BjAvXq8+WmKv5UxGA9U6X6vfGq7uEgvWIg6giih/GAYqtFbZm2c2H4HbXxD lnbqzQNGFuZMQ9M9SyYkpIvaqgpCx9obKdLtTsrJL2OLepA+ggvZMvZ7vJKhF5Axt4A6 5g9v7ktsCOlJ4eBDKL2ZR3fQK2Ia/+Fb9FRTI= 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=81SKuTdyEYpjYRBzJuJoTcO2tMHpG0vD2hLGJYOxVsA=; b=c/H+4LIWOAj2WTjmsWoHoKrMn2urscZiwDyjZtYQj687SqA7oiJnDruxWEcB8OxDx2 O7mI9it6uuQx9nyDqK6C/AU+AqyfOjJk7xh2Mzz2Hmrs1kArp1dfeQtE6TSyktUCJY2p I6exJaSRdCYLXC/Eu4v6h3jjsIAgGbxfV9vWWNzsHZNljEeS2NFAgDMm1MdTDuNfip3g 48FFysbAeIYa/AOCDjXQ+n422Kfkj7YUNez9BvPkTA+N3OYZR9LL8DXl0DnHHgSRto3m DjN09MKgN1v7dm+TTS39OeCPlE1PfmZrJgTgZC7ptt8HMvBhCOHIExDfEKagdPCKmjMc oAqg== X-Gm-Message-State: APf1xPDtpuV+x+BJ35RmPfnw4ClFWayPecUylNX9K53CbnAiMbB4TvUl WBLBqakWtpWJ0LcDMazUCtkLfw== X-Google-Smtp-Source: AG47ELsdY5lh327gOFh70llELZdrTuh9vl/S79vwpugiJ/cgyv5BqYoQjtu4m97G3VkgOT9HAbjkpw== X-Received: by 10.28.74.66 with SMTP id x63mr11059344wma.4.1519757884335; Tue, 27 Feb 2018 10:58:04 -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 t141sm260056wmd.34.2018.02.27.10.58.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Feb 2018 10:58:03 -0800 (PST) Date: Tue, 27 Feb 2018 18:58:01 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: "edk2-devel@lists.01.org" , "Gao, Liming" , "Zhu, Yonghong" Message-ID: <20180227185801.6d7mgbkaqtxppcid@bivouac.eciton.net> References: <20180227175132.1607-1-ard.biesheuvel@linaro.org> <20180227183327.lg6juoabvbc3jute@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 18:52:00 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. If neither of those feels practical, the proposed patch is fine. It just feels a little bit clunky. / Leif