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.web11.2813.1600823332834588006 for ; Tue, 22 Sep 2020 18:08:53 -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 DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Wed, 23 Sep 2020 09:08:48 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: "'Feng, Bob C'" , "'Chen, Christine'" References: <20200916010238.2031-1-gaoliming@byosoft.com.cn> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BBVENIIDEvMV0gQmFzZVRvb2xzOiBDb3B5IFBBQ0tFRCBkZWZpbml0aW9uIGZyb20gTWRlUGtnIEJhc2UuaA==?= Date: Wed, 23 Sep 2020 09:08:50 +0800 Message-ID: <005001d69146$1902cb00$4b086100$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGVmSQeIRzDSINUF6ChvzvJ4R2gkwIGWVs/qeclrmA= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Mike: PACKED definition is still required in BaseTools/Source/C/Include/Common= /BaseTypes.h, because PACKED is used in MdePkg\Include\IndustryStandard\Acp= i10.h.=20 After Include directory is changed, MdePkg Acpi10.h will be included. Th= en, this definition is required.=20 C source tools include BaseTools/Source/C/Include/Common/BaseTypes.h. Th= ey don't include MdePkg Base.h. When C source tools include MdePkg\Include\= IndustryStandard\Acpi10.h, we need to add the missing PACKED definition int= o BaseTools/Source/C/Include/Common/BaseTypes.h. So, this change is still r= elated to BZ 2938.=20 Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+65476+4905953+8761045@groups.i= o > =E4=BB=A3=E8=A1=A8 Michae= l D > Kinney > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B49=E6=9C=8823=E6=97=A5= 7:53 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; gaoliming@byosoft.com= .cn; Kinney, Michael > D > =E6=8A=84=E9=80=81: Feng, Bob C ; Chen, Christine > > =E4=B8=BB=E9=A2=98: Re: [edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED = definition from > MdePkg Base.h >=20 > Liming, >=20 > Is this change still required if you change the orders of includes? >=20 > I agree that defining PACKED for BaseTools include usage makes sense, > but does not seem to be related to this BZ. >=20 > Mike >=20 > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of > gaoliming > > Sent: Tuesday, September 15, 2020 6:03 PM > > To: devel@edk2.groups.io > > Cc: Feng, Bob C ; Chen, Christine > > > Subject: [edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED definition fr= om > MdePkg Base.h > > > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2938 > > > > 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. > > > > Cc: Bob Feng > > Cc: Yuwei Chen > > Signed-off-by: Liming Gao > > --- > > 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 standar= d. > > // > > -- > > 2.27.0.windows.1 > > > > > > > > >=20 >=20 >=20 >=20 >=20