* [PATCH 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h
@ 2020-09-16 1:02 gaoliming
2020-09-22 23:52 ` [edk2-devel] " Michael D Kinney
0 siblings, 1 reply; 5+ messages in thread
From: gaoliming @ 2020-09-16 1:02 UTC (permalink / raw)
To: devel; +Cc: Bob Feng, Yuwei Chen
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@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Liming Gao <gaoliming@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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h
2020-09-16 1:02 [PATCH 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h gaoliming
@ 2020-09-22 23:52 ` Michael D Kinney
2020-09-23 1:08 ` 回复: " gaoliming
0 siblings, 1 reply; 5+ messages in thread
From: Michael D Kinney @ 2020-09-22 23:52 UTC (permalink / raw)
To: devel@edk2.groups.io, gaoliming@byosoft.com.cn, Kinney, Michael D
Cc: Feng, Bob C, Chen, Christine
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@edk2.groups.io <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 <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@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@intel.com>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Signed-off-by: Liming Gao <gaoliming@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
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* 回复: [edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h
2020-09-22 23:52 ` [edk2-devel] " Michael D Kinney
@ 2020-09-23 1:08 ` gaoliming
2020-09-23 16:17 ` Michael D Kinney
0 siblings, 1 reply; 5+ messages in thread
From: gaoliming @ 2020-09-23 1:08 UTC (permalink / raw)
To: devel, michael.d.kinney; +Cc: 'Feng, Bob C', 'Chen, Christine'
Mike:
PACKED definition is still required in BaseTools/Source/C/Include/Common/BaseTypes.h, because PACKED is used in MdePkg\Include\IndustryStandard\Acpi10.h.
After Include directory is changed, MdePkg Acpi10.h will be included. Then, this definition is required.
C source tools include BaseTools/Source/C/Include/Common/BaseTypes.h. They don't include MdePkg Base.h. When C source tools include MdePkg\Include\IndustryStandard\Acpi10.h, we need to add the missing PACKED definition into BaseTools/Source/C/Include/Common/BaseTypes.h. So, this change is still related to BZ 2938.
Thanks
Liming
> -----邮件原件-----
> 发件人: bounce+27952+65476+4905953+8761045@groups.io
> <bounce+27952+65476+4905953+8761045@groups.io> 代表 Michael D
> Kinney
> 发送时间: 2020年9月23日 7:53
> 收件人: devel@edk2.groups.io; gaoliming@byosoft.com.cn; Kinney, Michael
> D <michael.d.kinney@intel.com>
> 抄送: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> <yuwei.chen@intel.com>
> 主题: Re: [edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED definition from
> MdePkg Base.h
>
> 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@edk2.groups.io <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 <bob.c.feng@intel.com>; Chen, Christine
> <yuwei.chen@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@intel.com>
> > Cc: Yuwei Chen <yuwei.chen@intel.com>
> > Signed-off-by: Liming Gao <gaoliming@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
> >
> >
> >
> >
>
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h
2020-09-23 1:08 ` 回复: " gaoliming
@ 2020-09-23 16:17 ` Michael D Kinney
2020-09-24 1:09 ` 回复: " gaoliming
0 siblings, 1 reply; 5+ messages in thread
From: Michael D Kinney @ 2020-09-23 16:17 UTC (permalink / raw)
To: devel@edk2.groups.io, gaoliming@byosoft.com.cn, Kinney, Michael D
Cc: Feng, Bob C, Chen, Christine
Liming,
Thanks. This makes sense now. Can you update commit messages to help explain
this.
I think what you are describing is the need to share include files between
BaseTools and FW packages to remove duplicate include content inside BaseTools.
However, building BaseTools needs its own BaseTypes.h for the host build
environment.
Thanks,
Mike
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming
> Sent: Tuesday, September 22, 2020 6:09 PM
> To: devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com>
> Subject: 回复: [edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h
>
> Mike:
> PACKED definition is still required in BaseTools/Source/C/Include/Common/BaseTypes.h, because PACKED is used in
> MdePkg\Include\IndustryStandard\Acpi10.h.
> After Include directory is changed, MdePkg Acpi10.h will be included. Then, this definition is required.
>
> C source tools include BaseTools/Source/C/Include/Common/BaseTypes.h. They don't include MdePkg Base.h. When C source tools
> include MdePkg\Include\IndustryStandard\Acpi10.h, we need to add the missing PACKED definition into
> BaseTools/Source/C/Include/Common/BaseTypes.h. So, this change is still related to BZ 2938.
>
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: bounce+27952+65476+4905953+8761045@groups.io
> > <bounce+27952+65476+4905953+8761045@groups.io> 代表 Michael D
> > Kinney
> > 发送时间: 2020年9月23日 7:53
> > 收件人: devel@edk2.groups.io; gaoliming@byosoft.com.cn; Kinney, Michael
> > D <michael.d.kinney@intel.com>
> > 抄送: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> > <yuwei.chen@intel.com>
> > 主题: Re: [edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED definition from
> > MdePkg Base.h
> >
> > 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@edk2.groups.io <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 <bob.c.feng@intel.com>; Chen, Christine
> > <yuwei.chen@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@intel.com>
> > > Cc: Yuwei Chen <yuwei.chen@intel.com>
> > > Signed-off-by: Liming Gao <gaoliming@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
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
>
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* 回复: [edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h
2020-09-23 16:17 ` Michael D Kinney
@ 2020-09-24 1:09 ` gaoliming
0 siblings, 0 replies; 5+ messages in thread
From: gaoliming @ 2020-09-24 1:09 UTC (permalink / raw)
To: 'Kinney, Michael D', devel
Cc: 'Feng, Bob C', 'Chen, Christine'
Mike:
Sure. Yes. This is the purpose for this change.
Thanks
Liming
> -----邮件原件-----
> 发件人: Kinney, Michael D <michael.d.kinney@intel.com>
> 发送时间: 2020年9月24日 0:18
> 收件人: devel@edk2.groups.io; gaoliming@byosoft.com.cn; Kinney, Michael
> D <michael.d.kinney@intel.com>
> 抄送: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> <yuwei.chen@intel.com>
> 主题: RE: [edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED definition from
> MdePkg Base.h
>
> Liming,
>
> Thanks. This makes sense now. Can you update commit messages to help
> explain
> this.
>
> I think what you are describing is the need to share include files between
> BaseTools and FW packages to remove duplicate include content inside
> BaseTools.
> However, building BaseTools needs its own BaseTypes.h for the host build
> environment.
>
> Thanks,
>
> Mike
>
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> gaoliming
> > Sent: Tuesday, September 22, 2020 6:09 PM
> > To: devel@edk2.groups.io; Kinney, Michael D
> <michael.d.kinney@intel.com>
> > Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> <yuwei.chen@intel.com>
> > Subject: 回复: [edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED definition
> from MdePkg Base.h
> >
> > Mike:
> > PACKED definition is still required in
> BaseTools/Source/C/Include/Common/BaseTypes.h, because PACKED is used
> in
> > MdePkg\Include\IndustryStandard\Acpi10.h.
> > After Include directory is changed, MdePkg Acpi10.h will be included.
> Then, this definition is required.
> >
> > C source tools include
> BaseTools/Source/C/Include/Common/BaseTypes.h. They don't include
> MdePkg Base.h. When C source tools
> > include MdePkg\Include\IndustryStandard\Acpi10.h, we need to add the
> missing PACKED definition into
> > BaseTools/Source/C/Include/Common/BaseTypes.h. So, this change is still
> related to BZ 2938.
> >
> > Thanks
> > Liming
> > > -----邮件原件-----
> > > 发件人: bounce+27952+65476+4905953+8761045@groups.io
> > > <bounce+27952+65476+4905953+8761045@groups.io> 代表 Michael D
> > > Kinney
> > > 发送时间: 2020年9月23日 7:53
> > > 收件人: devel@edk2.groups.io; gaoliming@byosoft.com.cn; Kinney,
> Michael
> > > D <michael.d.kinney@intel.com>
> > > 抄送: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> > > <yuwei.chen@intel.com>
> > > 主题: Re: [edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED definition
> from
> > > MdePkg Base.h
> > >
> > > 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@edk2.groups.io <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 <bob.c.feng@intel.com>; Chen, Christine
> > > <yuwei.chen@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@intel.com>
> > > > Cc: Yuwei Chen <yuwei.chen@intel.com>
> > > > Signed-off-by: Liming Gao <gaoliming@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
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-24 1:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-16 1:02 [PATCH 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h gaoliming
2020-09-22 23:52 ` [edk2-devel] " Michael D Kinney
2020-09-23 1:08 ` 回复: " gaoliming
2020-09-23 16:17 ` Michael D Kinney
2020-09-24 1:09 ` 回复: " gaoliming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox