public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"gaoliming@byosoft.com.cn" <gaoliming@byosoft.com.cn>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "Feng, Bob C" <bob.c.feng@intel.com>,
	"Chen, Christine" <yuwei.chen@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Copy PACKED definition from MdePkg Base.h
Date: Tue, 22 Sep 2020 23:52:40 +0000	[thread overview]
Message-ID: <MN2PR11MB44612C2CD014B1CC189D38B0D23B0@MN2PR11MB4461.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200916010238.2031-1-gaoliming@byosoft.com.cn>

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
> 
> 
> 
> 


  reply	other threads:[~2020-09-22 23:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-09-23  1:08   ` 回复: [edk2-devel] " gaoliming
2020-09-23 16:17     ` Michael D Kinney
2020-09-24  1:09       ` 回复: " gaoliming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR11MB44612C2CD014B1CC189D38B0D23B0@MN2PR11MB4461.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox