From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 63CBF2034A7C1 for ; Mon, 30 Oct 2017 22:38:00 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2017 22:41:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,322,1505804400"; d="scan'208";a="1237558663" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 30 Oct 2017 22:41:51 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 30 Oct 2017 22:41:51 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 30 Oct 2017 22:41:50 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Tue, 31 Oct 2017 13:41:49 +0800 From: "Gao, Liming" To: Ard Biesheuvel , "edk2-devel@lists.01.org" CC: "leif.lindholm@linaro.org" , "Zhu, Yonghong" Thread-Topic: [PATCH] BaseTools/tools_def: suppress GCC predefined macros in DTB compilation Thread-Index: AQHTTkLydVL6ywuXnU+MwNmSCN7ge6L9eTjQ Date: Tue, 31 Oct 2017 05:41:48 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E175A32@SHSMSX104.ccr.corp.intel.com> References: <20171026101209.31630-1-ard.biesheuvel@linaro.org> In-Reply-To: <20171026101209.31630-1-ard.biesheuvel@linaro.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] BaseTools/tools_def: suppress GCC predefined macros in DTB compilation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Oct 2017 05:38:01 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ard: I have no other comments.=20 Reviewed-by: Liming Gao Thanks Liming >-----Original Message----- >From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] >Sent: Thursday, October 26, 2017 6:12 PM >To: edk2-devel@lists.01.org >Cc: leif.lindholm@linaro.org; Gao, Liming ; Zhu, >Yonghong ; Ard Biesheuvel > >Subject: [PATCH] BaseTools/tools_def: suppress GCC predefined macros in >DTB compilation > >The standard GCC preprocessor we use to preprocess device tree sources >files has a whole bunch of macros predefined, among which > >This causes a property like 'linux,code' to be converted into '1,code' >which is obviously wrong. So let's get rid of all the predefined macros >by passing -undef to the preprocessor command line. > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Ard Biesheuvel >--- > BaseTools/Conf/tools_def.template | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/BaseTools/Conf/tools_def.template >b/BaseTools/Conf/tools_def.template >index df7c109438fd..98df0ffc9294 100755 >--- a/BaseTools/Conf/tools_def.template >+++ b/BaseTools/Conf/tools_def.template >@@ -4369,7 +4369,7 @@ DEFINE GCC_VFRPP_FLAGS =3D -x c -E -P - >DVFRCOMPILE --include $(DEST_DI > DEFINE GCC_ASLPP_FLAGS =3D -x c -E -include AutoGen.h > DEFINE GCC_ASLCC_FLAGS =3D -x c > DEFINE GCC_WINDRES_FLAGS =3D -J rc -O coff >-DEFINE GCC_DTCPP_FLAGS =3D -E -x assembler-with-cpp -imacros >$(DEST_DIR_DEBUG)/AutoGen.h -nostdinc >+DEFINE GCC_DTCPP_FLAGS =3D -E -x assembler-with-cpp -imacros >$(DEST_DIR_DEBUG)/AutoGen.h -nostdinc -undef > DEFINE GCC_IA32_RC_FLAGS =3D -I binary -O elf32-i386 -= B i386 -- >rename-section .data=3D.hii > DEFINE GCC_X64_RC_FLAGS =3D -I binary -O elf64-x86-64 -= B i386 -- >rename-section .data=3D.hii > DEFINE GCC_IPF_RC_FLAGS =3D -I binary -O elf64-ia64-little -= B ia64 -- >rename-section .data=3D.hii >-- >2.11.0