public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] MdePkg Base.h: Define STATIC_ASSERT macro as empty for EBC arch
@ 2019-09-24 15:05 Liming Gao
  2019-09-24 15:45 ` [edk2-devel] " Philippe Mathieu-Daudé
  2019-09-25  0:17 ` Leif Lindholm
  0 siblings, 2 replies; 5+ messages in thread
From: Liming Gao @ 2019-09-24 15:05 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney

EBC compiler doesn't support C11 static_assert macro.
So, define STATIC_ASSERT as empty to pass EBC arch build.
STATIC_ASSERT macro is introduced @204ae9da230ecbf0910c21acac7aa5d5e8cbb8d0

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
 MdePkg/Include/Base.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index ed85b98318..70e4d8daf1 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -799,12 +799,15 @@ typedef UINTN  *BASE_LIST;
   @param  Message     Raised compiler diagnostic message when expression is false.
 
 **/
-#ifdef _MSC_EXTENSIONS
+#ifdef MDE_CPU_EBC
+  #define STATIC_ASSERT(Expression, Message)
+#elif _MSC_EXTENSIONS
   #define STATIC_ASSERT static_assert
 #else
   #define STATIC_ASSERT _Static_assert
 #endif
 
+
 //
 // Verify that ProcessorBind.h produced UEFI Data Types that are compliant with
 // Section 2.3.1 of the UEFI 2.3 Specification.
-- 
2.13.0.windows.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [Patch] MdePkg Base.h: Define STATIC_ASSERT macro as empty for EBC arch
  2019-09-24 15:05 [Patch] MdePkg Base.h: Define STATIC_ASSERT macro as empty for EBC arch Liming Gao
@ 2019-09-24 15:45 ` Philippe Mathieu-Daudé
  2019-09-25  0:17 ` Leif Lindholm
  1 sibling, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-09-24 15:45 UTC (permalink / raw)
  To: devel, liming.gao; +Cc: Michael D Kinney

On 9/24/19 5:05 PM, Liming Gao wrote:
> EBC compiler doesn't support C11 static_assert macro.
> So, define STATIC_ASSERT as empty to pass EBC arch build.
> STATIC_ASSERT macro is introduced @204ae9da230ecbf0910c21acac7aa5d5e8cbb8d0
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Signed-off-by: Liming Gao <liming.gao@intel.com>
> ---
>  MdePkg/Include/Base.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
> index ed85b98318..70e4d8daf1 100644
> --- a/MdePkg/Include/Base.h
> +++ b/MdePkg/Include/Base.h
> @@ -799,12 +799,15 @@ typedef UINTN  *BASE_LIST;
>    @param  Message     Raised compiler diagnostic message when expression is false.
>  
>  **/
> -#ifdef _MSC_EXTENSIONS
> +#ifdef MDE_CPU_EBC
> +  #define STATIC_ASSERT(Expression, Message)
> +#elif _MSC_EXTENSIONS
>    #define STATIC_ASSERT static_assert
>  #else
>    #define STATIC_ASSERT _Static_assert
>  #endif
>  
> +
>  //
>  // Verify that ProcessorBind.h produced UEFI Data Types that are compliant with
>  // Section 2.3.1 of the UEFI 2.3 Specification.
> 

Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [Patch] MdePkg Base.h: Define STATIC_ASSERT macro as empty for EBC arch
  2019-09-24 15:05 [Patch] MdePkg Base.h: Define STATIC_ASSERT macro as empty for EBC arch Liming Gao
  2019-09-24 15:45 ` [edk2-devel] " Philippe Mathieu-Daudé
@ 2019-09-25  0:17 ` Leif Lindholm
  2019-09-25  0:37   ` Liming Gao
  1 sibling, 1 reply; 5+ messages in thread
From: Leif Lindholm @ 2019-09-25  0:17 UTC (permalink / raw)
  To: devel, liming.gao; +Cc: Michael D Kinney

On Tue, Sep 24, 2019 at 11:05:19PM +0800, Liming Gao wrote:
> EBC compiler doesn't support C11 static_assert macro.
> So, define STATIC_ASSERT as empty to pass EBC arch build.
> STATIC_ASSERT macro is introduced @204ae9da230ecbf0910c21acac7aa5d5e8cbb8d0
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Signed-off-by: Liming Gao <liming.gao@intel.com>
> ---
>  MdePkg/Include/Base.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
> index ed85b98318..70e4d8daf1 100644
> --- a/MdePkg/Include/Base.h
> +++ b/MdePkg/Include/Base.h
> @@ -799,12 +799,15 @@ typedef UINTN  *BASE_LIST;
>    @param  Message     Raised compiler diagnostic message when expression is false.
>  
>  **/
> -#ifdef _MSC_EXTENSIONS
> +#ifdef MDE_CPU_EBC
> +  #define STATIC_ASSERT(Expression, Message)
> +#elif _MSC_EXTENSIONS
>    #define STATIC_ASSERT static_assert
>  #else
>    #define STATIC_ASSERT _Static_assert
>  #endif
>  
> +

Please delete this spurious added blank line.
With that:
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

>  //
>  // Verify that ProcessorBind.h produced UEFI Data Types that are compliant with
>  // Section 2.3.1 of the UEFI 2.3 Specification.
> -- 
> 2.13.0.windows.1
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [Patch] MdePkg Base.h: Define STATIC_ASSERT macro as empty for EBC arch
  2019-09-25  0:17 ` Leif Lindholm
@ 2019-09-25  0:37   ` Liming Gao
  2019-09-25  4:40     ` Michael D Kinney
  0 siblings, 1 reply; 5+ messages in thread
From: Liming Gao @ 2019-09-25  0:37 UTC (permalink / raw)
  To: Leif Lindholm, devel@edk2.groups.io; +Cc: Kinney, Michael D

Lefi:
  Thanks for your comment. I will update the patch when submit it. 

Thanks
Liming
>-----Original Message-----
>From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
>Sent: Wednesday, September 25, 2019 8:18 AM
>To: devel@edk2.groups.io; Gao, Liming <liming.gao@intel.com>
>Cc: Kinney, Michael D <michael.d.kinney@intel.com>
>Subject: Re: [edk2-devel] [Patch] MdePkg Base.h: Define STATIC_ASSERT
>macro as empty for EBC arch
>
>On Tue, Sep 24, 2019 at 11:05:19PM +0800, Liming Gao wrote:
>> EBC compiler doesn't support C11 static_assert macro.
>> So, define STATIC_ASSERT as empty to pass EBC arch build.
>> STATIC_ASSERT macro is introduced
>@204ae9da230ecbf0910c21acac7aa5d5e8cbb8d0
>>
>> Cc: Michael D Kinney <michael.d.kinney@intel.com>
>> Signed-off-by: Liming Gao <liming.gao@intel.com>
>> ---
>>  MdePkg/Include/Base.h | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
>> index ed85b98318..70e4d8daf1 100644
>> --- a/MdePkg/Include/Base.h
>> +++ b/MdePkg/Include/Base.h
>> @@ -799,12 +799,15 @@ typedef UINTN  *BASE_LIST;
>>    @param  Message     Raised compiler diagnostic message when expression
>is false.
>>
>>  **/
>> -#ifdef _MSC_EXTENSIONS
>> +#ifdef MDE_CPU_EBC
>> +  #define STATIC_ASSERT(Expression, Message)
>> +#elif _MSC_EXTENSIONS
>>    #define STATIC_ASSERT static_assert
>>  #else
>>    #define STATIC_ASSERT _Static_assert
>>  #endif
>>
>> +
>
>Please delete this spurious added blank line.
>With that:
>Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
>
>>  //
>>  // Verify that ProcessorBind.h produced UEFI Data Types that are compliant
>with
>>  // Section 2.3.1 of the UEFI 2.3 Specification.
>> --
>> 2.13.0.windows.1
>>
>>
>> 
>>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [Patch] MdePkg Base.h: Define STATIC_ASSERT macro as empty for EBC arch
  2019-09-25  0:37   ` Liming Gao
@ 2019-09-25  4:40     ` Michael D Kinney
  0 siblings, 0 replies; 5+ messages in thread
From: Michael D Kinney @ 2019-09-25  4:40 UTC (permalink / raw)
  To: Gao, Liming, Leif Lindholm, devel@edk2.groups.io,
	Kinney, Michael D

Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>

> -----Original Message-----
> From: Gao, Liming <liming.gao@intel.com>
> Sent: Tuesday, September 24, 2019 5:38 PM
> To: Leif Lindholm <leif.lindholm@linaro.org>;
> devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> Subject: RE: [edk2-devel] [Patch] MdePkg Base.h: Define
> STATIC_ASSERT macro as empty for EBC arch
> 
> Lefi:
>   Thanks for your comment. I will update the patch when
> submit it.
> 
> Thanks
> Liming
> >-----Original Message-----
> >From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
> >Sent: Wednesday, September 25, 2019 8:18 AM
> >To: devel@edk2.groups.io; Gao, Liming
> <liming.gao@intel.com>
> >Cc: Kinney, Michael D <michael.d.kinney@intel.com>
> >Subject: Re: [edk2-devel] [Patch] MdePkg Base.h: Define
> STATIC_ASSERT
> >macro as empty for EBC arch
> >
> >On Tue, Sep 24, 2019 at 11:05:19PM +0800, Liming Gao
> wrote:
> >> EBC compiler doesn't support C11 static_assert macro.
> >> So, define STATIC_ASSERT as empty to pass EBC arch
> build.
> >> STATIC_ASSERT macro is introduced
> >@204ae9da230ecbf0910c21acac7aa5d5e8cbb8d0
> >>
> >> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> >> Signed-off-by: Liming Gao <liming.gao@intel.com>
> >> ---
> >>  MdePkg/Include/Base.h | 5 ++++-
> >>  1 file changed, 4 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/MdePkg/Include/Base.h
> b/MdePkg/Include/Base.h index
> >> ed85b98318..70e4d8daf1 100644
> >> --- a/MdePkg/Include/Base.h
> >> +++ b/MdePkg/Include/Base.h
> >> @@ -799,12 +799,15 @@ typedef UINTN  *BASE_LIST;
> >>    @param  Message     Raised compiler diagnostic
> message when expression
> >is false.
> >>
> >>  **/
> >> -#ifdef _MSC_EXTENSIONS
> >> +#ifdef MDE_CPU_EBC
> >> +  #define STATIC_ASSERT(Expression, Message) #elif
> _MSC_EXTENSIONS
> >>    #define STATIC_ASSERT static_assert  #else
> >>    #define STATIC_ASSERT _Static_assert  #endif
> >>
> >> +
> >
> >Please delete this spurious added blank line.
> >With that:
> >Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
> >
> >>  //
> >>  // Verify that ProcessorBind.h produced UEFI Data
> Types that are
> >> compliant
> >with
> >>  // Section 2.3.1 of the UEFI 2.3 Specification.
> >> --
> >> 2.13.0.windows.1
> >>
> >>
> >> 
> >>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-25  4:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-24 15:05 [Patch] MdePkg Base.h: Define STATIC_ASSERT macro as empty for EBC arch Liming Gao
2019-09-24 15:45 ` [edk2-devel] " Philippe Mathieu-Daudé
2019-09-25  0:17 ` Leif Lindholm
2019-09-25  0:37   ` Liming Gao
2019-09-25  4:40     ` Michael D Kinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox