* [edk2-devel] [PATCH v2 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h
@ 2020-09-25 7:49 gaoliming
2020-09-29 7:29 ` Bob Feng
0 siblings, 1 reply; 2+ messages in thread
From: gaoliming @ 2020-09-25 7:49 UTC (permalink / raw)
To: devel; +Cc: gaoliming, Bob Feng, Yuwei Chen, Michael Kinney
From: gaoliming <gaoliming@byosoft.com.cn>
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [edk2-devel] [PATCH v2 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h
2020-09-25 7:49 [edk2-devel] [PATCH v2 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h gaoliming
@ 2020-09-29 7:29 ` Bob Feng
0 siblings, 0 replies; 2+ messages in thread
From: Bob Feng @ 2020-09-29 7:29 UTC (permalink / raw)
To: Liming Gao, devel@edk2.groups.io; +Cc: Chen, Christine, Kinney, Michael D
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-----Original Message-----
From: Liming Gao <gaoliming@byosoft.com.cn>
Sent: Friday, September 25, 2020 3:49 PM
To: devel@edk2.groups.io
Cc: gaoliming <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: [edk2-devel] [PATCH v2 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h
From: gaoliming <gaoliming@byosoft.com.cn>
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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-29 7:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-25 7:49 [edk2-devel] [PATCH v2 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h gaoliming
2020-09-29 7:29 ` Bob Feng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox