]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Copy PACKED definition from MdePkg Base.h
authorgaoliming <gaoliming@byosoft.com.cn>
Fri, 25 Sep 2020 07:49:18 +0000 (15:49 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sat, 10 Oct 2020 05:43:11 +0000 (05:43 +0000)
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 <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Tested-by: Garrett Kirkendall <garrett.kirkendall@amd.com>
BaseTools/Source/C/Include/Common/BaseTypes.h

index 31d0662085a811b358529c238cadd4862541806d..150980b4c0bf5facf97a55d13bc0e66ba891ff34 100644 (file)
 #define NULL  ((VOID *) 0)\r
 #endif\r
 \r
+#ifdef __CC_ARM\r
+  //\r
+  // Older RVCT ARM compilers don't fully support #pragma pack and require __packed\r
+  // as a prefix for the structure.\r
+  //\r
+  #define PACKED  __packed\r
+#else\r
+  #define PACKED\r
+#endif\r
+\r
 //\r
 //  Support for variable length argument lists using the ANSI standard.\r
 //\r