From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 08C6B2218E939 for ; Wed, 6 Dec 2017 19:05:08 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Dec 2017 19:09:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,370,1508828400"; d="scan'208";a="13818449" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga001.jf.intel.com with ESMTP; 06 Dec 2017 19:09:41 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 6 Dec 2017 19:09:40 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 6 Dec 2017 19:09:20 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Thu, 7 Dec 2017 11:09:18 +0800 From: "Gao, Liming" To: Leif Lindholm , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "ard.biesheuvel@linaro.org" Thread-Topic: [PATCH] MdePkg: Arm/AArch64 - filter #pragma pack() when __ASSEMBLER__ Thread-Index: AQHTbrTEcna600bzF0ungzCsb263WKM3NBxA Date: Thu, 7 Dec 2017 03:09:17 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E18BA7A@SHSMSX104.ccr.corp.intel.com> References: <20171206170745.8705-1-leif.lindholm@linaro.org> In-Reply-To: <20171206170745.8705-1-leif.lindholm@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] MdePkg: Arm/AArch64 - filter #pragma pack() when __ASSEMBLER__ 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: Thu, 07 Dec 2017 03:05:09 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Leif Lindholm [mailto:leif.lindholm@linaro.org] >Sent: Thursday, December 07, 2017 1:08 AM >To: edk2-devel@lists.01.org >Cc: Kinney, Michael D ; Gao, Liming >; ard.biesheuvel@linaro.org >Subject: [PATCH] MdePkg: Arm/AArch64 - filter #pragma pack() when >__ASSEMBLER__ > >clang, when used as a preprocessor for dtc, does not discard #pragma >statements although -x assembler-with-cpp is specified. This causes dtc >to barf at a #pragma pack() statement that is already filtered out for >__GNUC__. So add a check to also filter this out if __ASSEMBLER__. > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Leif Lindholm >--- > MdePkg/Include/AArch64/ProcessorBind.h | 2 +- > MdePkg/Include/Arm/ProcessorBind.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/MdePkg/Include/AArch64/ProcessorBind.h >b/MdePkg/Include/AArch64/ProcessorBind.h >index 775e7498c5..7b0f0ff32f 100644 >--- a/MdePkg/Include/AArch64/ProcessorBind.h >+++ b/MdePkg/Include/AArch64/ProcessorBind.h >@@ -26,7 +26,7 @@ > // > // Make sure we are using the correct packing rules per EFI specification > // >-#ifndef __GNUC__ >+#if !defined(__GNUC__) && !defined(__ASSEMBLER__) > #pragma pack() > #endif > >diff --git a/MdePkg/Include/Arm/ProcessorBind.h >b/MdePkg/Include/Arm/ProcessorBind.h >index dde1fd1152..42ea2f3055 100644 >--- a/MdePkg/Include/Arm/ProcessorBind.h >+++ b/MdePkg/Include/Arm/ProcessorBind.h >@@ -24,7 +24,7 @@ > // > // Make sure we are using the correct packing rules per EFI specification > // >-#ifndef __GNUC__ >+#if !defined(__GNUC__) && !defined(__ASSEMBLER__) > #pragma pack() > #endif > >-- >2.11.0