From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web10.2687.1601020187824881280 for ; Fri, 25 Sep 2020 00:49:48 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from localhost.localdomain ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Fri, 25 Sep 2020 15:49:41 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: devel@edk2.groups.io Cc: gaoliming , Bob Feng , Yuwei Chen , Michael Kinney Subject: [edk2-devel] [PATCH v2 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h Date: Fri, 25 Sep 2020 15:49:18 +0800 Message-Id: <20200925074918.221-1-gaoliming@byosoft.com.cn> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: gaoliming BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2938 MdePkg Acpi10.h definition depends on PACKED. When structure PCD refers to Acpi10.h, build will fail, because PACKED definition is missing in BaseTools BaseTypes.h. C source tools include BaseTools BaseTypes.h. They don't include MdePkg Base.h. When C source tools include MdePkg Acpi10.h, they also need PACKED definition. So, add PACKED definition into BaseTools BaseTypes.h. Cc: Bob Feng Cc: Yuwei Chen Cc: Michael Kinney Signed-off-by: Liming Gao --- V2: update the commit message. BaseTools/Source/C/Include/Common/BaseTypes.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/BaseTools/Source/C/Include/Common/BaseTypes.h b/BaseTools/Source/C/Include/Common/BaseTypes.h index 31d0662085a8..150980b4c0bf 100644 --- a/BaseTools/Source/C/Include/Common/BaseTypes.h +++ b/BaseTools/Source/C/Include/Common/BaseTypes.h @@ -57,6 +57,16 @@ #define NULL ((VOID *) 0) #endif +#ifdef __CC_ARM + // + // Older RVCT ARM compilers don't fully support #pragma pack and require __packed + // as a prefix for the structure. + // + #define PACKED __packed +#else + #define PACKED +#endif + // // Support for variable length argument lists using the ANSI standard. // -- 2.27.0.windows.1 GitPatchExtractor 1.1