[edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h

Michael D Kinney michael.d.kinney at intel.com
Tue Sep 22 23:52:40 UTC 2020


Liming,

Is this change still required if you change the orders of includes?

I agree that defining PACKED for BaseTools include usage makes sense,
but does not seem to be related to this BZ.

Mike

> -----Original Message-----
> From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of gaoliming
> Sent: Tuesday, September 15, 2020 6:03 PM
> To: devel at edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng at intel.com>; Chen, Christine <yuwei.chen at intel.com>
> Subject: [edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h
> 
> 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.
> 
> Cc: Bob Feng <bob.c.feng at intel.com>
> Cc: Yuwei Chen <yuwei.chen at intel.com>
> Signed-off-by: Liming Gao <gaoliming at byosoft.com.cn>
> ---
>  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
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#65476): https://edk2.groups.io/g/devel/message/65476
Mute This Topic: https://groups.io/mt/76878716/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list