[edk2-devel] [PATCH] MdePkg/Include: AARCH64: disable outline atomics on GCC 10.2+

Ard Biesheuvel posted 1 patch 3 days ago
Failed in applying to current master (apply log)
MdePkg/Include/AArch64/ProcessorBind.h | 11 +++++++++++
1 file changed, 11 insertions(+)

[edk2-devel] [PATCH] MdePkg/Include: AARCH64: disable outline atomics on GCC 10.2+

Posted by Ard Biesheuvel 3 days ago
GCC 10 enabled a feature by default that was introduced in GCC 9,
which results in atomic operations to be emitted as function calls
to intrinsics provided by a runtime library.

Atomics are hardly used in EDK2, which runs on a single CPU anyway,
and any benefit that would result from reusing library code that
implements these operations is defeated by the fact that every EDK2
module will need to have its own copy anyway.

So let's disable this feature on GCC versions that support the
pragma to do so (GCC 10.2 and up)

Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
---
The GCC support for this pragma has already been pulled into the 10.2
release branch. I think we should consider adding this to the stable
tag, so that the issue can easily be resolved by upgrading the compiler.
Whether we add the intrinsics too is a separate matter, but we can
revisit that later.

 MdePkg/Include/AArch64/ProcessorBind.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h
index 896bf273ac7a..a3ca8f09e51c 100644
--- a/MdePkg/Include/AArch64/ProcessorBind.h
+++ b/MdePkg/Include/AArch64/ProcessorBind.h
@@ -24,6 +24,17 @@
 #pragma pack()
 #endif
 
+#if defined(__GNUC__) && !defined(__clang__)
+
+//
+// Disable GCC outline atomics
+// Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
+//
+#if __GNUC__ > 10 || (__GNUC__ == 10 && __GNUC_MINOR__ >= 2)
+#pragma GCC target "no-outline-atomics"
+#endif
+#endif
+
 #if defined(_MSC_EXTENSIONS)
 
 //
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#60108): https://edk2.groups.io/g/devel/message/60108
Mute This Topic: https://groups.io/mt/74396053/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] MdePkg/Include: AARCH64: disable outline atomics on GCC 10.2+

Posted by Laszlo Ersek 2 days ago
On 05/22/20 12:12, Ard Biesheuvel wrote:
> GCC 10 enabled a feature by default that was introduced in GCC 9,
> which results in atomic operations to be emitted as function calls
> to intrinsics provided by a runtime library.
> 
> Atomics are hardly used in EDK2, which runs on a single CPU anyway,
> and any benefit that would result from reusing library code that
> implements these operations is defeated by the fact that every EDK2
> module will need to have its own copy anyway.
> 
> So let's disable this feature on GCC versions that support the
> pragma to do so (GCC 10.2 and up)
> 
> Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
> ---
> The GCC support for this pragma has already been pulled into the 10.2
> release branch. I think we should consider adding this to the stable
> tag, so that the issue can easily be resolved by upgrading the compiler.
> Whether we add the intrinsics too is a separate matter, but we can
> revisit that later.
> 
>  MdePkg/Include/AArch64/ProcessorBind.h | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h
> index 896bf273ac7a..a3ca8f09e51c 100644
> --- a/MdePkg/Include/AArch64/ProcessorBind.h
> +++ b/MdePkg/Include/AArch64/ProcessorBind.h
> @@ -24,6 +24,17 @@
>  #pragma pack()
>  #endif
>  
> +#if defined(__GNUC__) && !defined(__clang__)
> +
> +//
> +// Disable GCC outline atomics
> +// Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
> +//
> +#if __GNUC__ > 10 || (__GNUC__ == 10 && __GNUC_MINOR__ >= 2)
> +#pragma GCC target "no-outline-atomics"
> +#endif
> +#endif
> +
>  #if defined(_MSC_EXTENSIONS)
>  
>  //
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

But I think it should be merged later, after GCC 10.2 is out.

(Obviously I don't "insist" that we follow this approach, I'm just OK
with it.)

Thanks
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#60169): https://edk2.groups.io/g/devel/message/60169
Mute This Topic: https://groups.io/mt/74396053/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] MdePkg/Include: AARCH64: disable outline atomics on GCC 10.2+

Posted by Laszlo Ersek 2 days ago
On 05/22/20 22:01, Laszlo Ersek wrote:
> On 05/22/20 12:12, Ard Biesheuvel wrote:
>> GCC 10 enabled a feature by default that was introduced in GCC 9,
>> which results in atomic operations to be emitted as function calls
>> to intrinsics provided by a runtime library.
>>
>> Atomics are hardly used in EDK2, which runs on a single CPU anyway,
>> and any benefit that would result from reusing library code that
>> implements these operations is defeated by the fact that every EDK2
>> module will need to have its own copy anyway.
>>
>> So let's disable this feature on GCC versions that support the
>> pragma to do so (GCC 10.2 and up)
>>
>> Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
>> ---
>> The GCC support for this pragma has already been pulled into the 10.2
>> release branch. I think we should consider adding this to the stable
>> tag, so that the issue can easily be resolved by upgrading the compiler.
>> Whether we add the intrinsics too is a separate matter, but we can
>> revisit that later.
>>
>>  MdePkg/Include/AArch64/ProcessorBind.h | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h
>> index 896bf273ac7a..a3ca8f09e51c 100644
>> --- a/MdePkg/Include/AArch64/ProcessorBind.h
>> +++ b/MdePkg/Include/AArch64/ProcessorBind.h
>> @@ -24,6 +24,17 @@
>>  #pragma pack()
>>  #endif
>>  
>> +#if defined(__GNUC__) && !defined(__clang__)
>> +
>> +//
>> +// Disable GCC outline atomics
>> +// Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
>> +//
>> +#if __GNUC__ > 10 || (__GNUC__ == 10 && __GNUC_MINOR__ >= 2)
>> +#pragma GCC target "no-outline-atomics"
>> +#endif
>> +#endif
>> +
>>  #if defined(_MSC_EXTENSIONS)
>>  
>>  //
>>
> 
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> 
> But I think it should be merged later, after GCC 10.2 is out.
> 
> (Obviously I don't "insist" that we follow this approach, I'm just OK
> with it.)

Oh and I think both this patch and the assembly language implementation
for the atomics should be delayed after the stable tag. gcc-10 is a new
toolchain; so even if we don't introduce a new toolchain tag such as
GCC10 for it, whatever we do in order to make it work, that's feature
enablement in my book.

Thanks,
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#60170): https://edk2.groups.io/g/devel/message/60170
Mute This Topic: https://groups.io/mt/74396053/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] MdePkg/Include: AARCH64: disable outline atomics on GCC 10.2+

Posted by Ard Biesheuvel 2 days ago
On 5/22/20 10:05 PM, Laszlo Ersek via groups.io wrote:
> On 05/22/20 22:01, Laszlo Ersek wrote:
>> On 05/22/20 12:12, Ard Biesheuvel wrote:
>>> GCC 10 enabled a feature by default that was introduced in GCC 9,
>>> which results in atomic operations to be emitted as function calls
>>> to intrinsics provided by a runtime library.
>>>
>>> Atomics are hardly used in EDK2, which runs on a single CPU anyway,
>>> and any benefit that would result from reusing library code that
>>> implements these operations is defeated by the fact that every EDK2
>>> module will need to have its own copy anyway.
>>>
>>> So let's disable this feature on GCC versions that support the
>>> pragma to do so (GCC 10.2 and up)
>>>
>>> Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
>>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
>>> ---
>>> The GCC support for this pragma has already been pulled into the 10.2
>>> release branch. I think we should consider adding this to the stable
>>> tag, so that the issue can easily be resolved by upgrading the compiler.
>>> Whether we add the intrinsics too is a separate matter, but we can
>>> revisit that later.
>>>
>>>   MdePkg/Include/AArch64/ProcessorBind.h | 11 +++++++++++
>>>   1 file changed, 11 insertions(+)
>>>
>>> diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h
>>> index 896bf273ac7a..a3ca8f09e51c 100644
>>> --- a/MdePkg/Include/AArch64/ProcessorBind.h
>>> +++ b/MdePkg/Include/AArch64/ProcessorBind.h
>>> @@ -24,6 +24,17 @@
>>>   #pragma pack()
>>>   #endif
>>>   
>>> +#if defined(__GNUC__) && !defined(__clang__)
>>> +
>>> +//
>>> +// Disable GCC outline atomics
>>> +// Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
>>> +//
>>> +#if __GNUC__ > 10 || (__GNUC__ == 10 && __GNUC_MINOR__ >= 2)
>>> +#pragma GCC target "no-outline-atomics"
>>> +#endif
>>> +#endif
>>> +
>>>   #if defined(_MSC_EXTENSIONS)
>>>   
>>>   //
>>>
>>
>> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>>
>> But I think it should be merged later, after GCC 10.2 is out.
>>
>> (Obviously I don't "insist" that we follow this approach, I'm just OK
>> with it.)
> 
> Oh and I think both this patch and the assembly language implementation
> for the atomics should be delayed after the stable tag. gcc-10 is a new
> toolchain; so even if we don't introduce a new toolchain tag such as
> GCC10 for it, whatever we do in order to make it work, that's feature
> enablement in my book.
> 

Works for me. By the time the next stable tag comes around, early 
adopters that are now on GCC 10.1 will likely have moved to 10.2 by that 
time, and so we may not need the assembly patch at all.



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#60177): https://edk2.groups.io/g/devel/message/60177
Mute This Topic: https://groups.io/mt/74396053/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] MdePkg/Include: AARCH64: disable outline atomics on GCC 10.2+

Posted by Leif Lindholm 2 days ago
On Fri, May 22, 2020 at 12:12:02 +0200, Ard Biesheuvel wrote:
> GCC 10 enabled a feature by default that was introduced in GCC 9,
> which results in atomic operations to be emitted as function calls
> to intrinsics provided by a runtime library.
> 
> Atomics are hardly used in EDK2, which runs on a single CPU anyway,
> and any benefit that would result from reusing library code that
> implements these operations is defeated by the fact that every EDK2
> module will need to have its own copy anyway.
> 
> So let's disable this feature on GCC versions that support the
> pragma to do so (GCC 10.2 and up)
> 
> Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
>
> ---
> The GCC support for this pragma has already been pulled into the 10.2
> release branch. I think we should consider adding this to the stable
> tag, so that the issue can easily be resolved by upgrading the compiler.
> Whether we add the intrinsics too is a separate matter, but we can
> revisit that later.

Hmm. I am just slightly concerned over referencing GCC 10.2 before GCC
10.2 is released.
Presumably, there will be no ill effects if that pragma is enabled also
on 10.2, we just won't need it? If so ...

>  MdePkg/Include/AArch64/ProcessorBind.h | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h
> index 896bf273ac7a..a3ca8f09e51c 100644
> --- a/MdePkg/Include/AArch64/ProcessorBind.h
> +++ b/MdePkg/Include/AArch64/ProcessorBind.h
> @@ -24,6 +24,17 @@
>  #pragma pack()
>  #endif
>  
> +#if defined(__GNUC__) && !defined(__clang__)
> +
> +//
> +// Disable GCC outline atomics
> +// Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
> +//
> +#if __GNUC__ > 10 || (__GNUC__ == 10 && __GNUC_MINOR__ >= 2)

Could we do >= 10 here for now, and update to this conditional once
we've verified that the change does really make it into 10.2?

If so, I support including it in the stable tag.

/
    Leif

> +#pragma GCC target "no-outline-atomics"
> +#endif
> +#endif
> +
>  #if defined(_MSC_EXTENSIONS)
>  
>  //
> -- 
> 2.17.1
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#60131): https://edk2.groups.io/g/devel/message/60131
Mute This Topic: https://groups.io/mt/74396053/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] MdePkg/Include: AARCH64: disable outline atomics on GCC 10.2+

Posted by Ard Biesheuvel 2 days ago
On 5/22/20 1:41 PM, Leif Lindholm wrote:
> On Fri, May 22, 2020 at 12:12:02 +0200, Ard Biesheuvel wrote:
>> GCC 10 enabled a feature by default that was introduced in GCC 9,
>> which results in atomic operations to be emitted as function calls
>> to intrinsics provided by a runtime library.
>>
>> Atomics are hardly used in EDK2, which runs on a single CPU anyway,
>> and any benefit that would result from reusing library code that
>> implements these operations is defeated by the fact that every EDK2
>> module will need to have its own copy anyway.
>>
>> So let's disable this feature on GCC versions that support the
>> pragma to do so (GCC 10.2 and up)
>>
>> Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
>>
>> ---
>> The GCC support for this pragma has already been pulled into the 10.2
>> release branch. I think we should consider adding this to the stable
>> tag, so that the issue can easily be resolved by upgrading the compiler.
>> Whether we add the intrinsics too is a separate matter, but we can
>> revisit that later.
> 
> Hmm. I am just slightly concerned over referencing GCC 10.2 before GCC
> 10.2 is released.
> Presumably, there will be no ill effects if that pragma is enabled also
> on 10.2, we just won't need it? If so ...
> 

No the pragma is only enabled on 10.2 and later. Older GCCs will choke 
on it.

>>   MdePkg/Include/AArch64/ProcessorBind.h | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h
>> index 896bf273ac7a..a3ca8f09e51c 100644
>> --- a/MdePkg/Include/AArch64/ProcessorBind.h
>> +++ b/MdePkg/Include/AArch64/ProcessorBind.h
>> @@ -24,6 +24,17 @@
>>   #pragma pack()
>>   #endif
>>   
>> +#if defined(__GNUC__) && !defined(__clang__)
>> +
>> +//
>> +// Disable GCC outline atomics
>> +// Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
>> +//
>> +#if __GNUC__ > 10 || (__GNUC__ == 10 && __GNUC_MINOR__ >= 2)
> 
> Could we do >= 10 here for now, and update to this conditional once
> we've verified that the change does really make it into 10.2?
> 

That would break all GCC 10, even if no users of the outline atomics are 
part of the build.

> If so, I support including it in the stable tag.
> 
> /
>      Leif
> 
>> +#pragma GCC target "no-outline-atomics"
>> +#endif
>> +#endif
>> +
>>   #if defined(_MSC_EXTENSIONS)
>>   
>>   //
>> -- 
>> 2.17.1
>>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#60134): https://edk2.groups.io/g/devel/message/60134
Mute This Topic: https://groups.io/mt/74396053/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] MdePkg/Include: AARCH64: disable outline atomics on GCC 10.2+

Posted by Leif Lindholm 2 days ago
On Fri, May 22, 2020 at 14:05:02 +0200, Ard Biesheuvel wrote:
> On 5/22/20 1:41 PM, Leif Lindholm wrote:
> > On Fri, May 22, 2020 at 12:12:02 +0200, Ard Biesheuvel wrote:
> > > GCC 10 enabled a feature by default that was introduced in GCC 9,
> > > which results in atomic operations to be emitted as function calls
> > > to intrinsics provided by a runtime library.
> > > 
> > > Atomics are hardly used in EDK2, which runs on a single CPU anyway,
> > > and any benefit that would result from reusing library code that
> > > implements these operations is defeated by the fact that every EDK2
> > > module will need to have its own copy anyway.
> > > 
> > > So let's disable this feature on GCC versions that support the
> > > pragma to do so (GCC 10.2 and up)
> > > 
> > > Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
> > > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > > 
> > > ---
> > > The GCC support for this pragma has already been pulled into the 10.2
> > > release branch. I think we should consider adding this to the stable
> > > tag, so that the issue can easily be resolved by upgrading the compiler.
> > > Whether we add the intrinsics too is a separate matter, but we can
> > > revisit that later.
> > 
> > Hmm. I am just slightly concerned over referencing GCC 10.2 before GCC
> > 10.2 is released.
> > Presumably, there will be no ill effects if that pragma is enabled also
> > on 10.2, we just won't need it? If so ...
> > 
> 
> No the pragma is only enabled on 10.2 and later. Older GCCs will choke on
> it.

Urgh, right. I guess I'm having a "can't read" day.

Still. That means that if the pragma gets pulled last second from
10.2, we now explicitly break builds for 10.2.
No matter how low the risk of that happening, this doesn't make me
comfortable.

/
    Leif

> > >   MdePkg/Include/AArch64/ProcessorBind.h | 11 +++++++++++
> > >   1 file changed, 11 insertions(+)
> > > 
> > > diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h
> > > index 896bf273ac7a..a3ca8f09e51c 100644
> > > --- a/MdePkg/Include/AArch64/ProcessorBind.h
> > > +++ b/MdePkg/Include/AArch64/ProcessorBind.h
> > > @@ -24,6 +24,17 @@
> > >   #pragma pack()
> > >   #endif
> > > +#if defined(__GNUC__) && !defined(__clang__)
> > > +
> > > +//
> > > +// Disable GCC outline atomics
> > > +// Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
> > > +//
> > > +#if __GNUC__ > 10 || (__GNUC__ == 10 && __GNUC_MINOR__ >= 2)
> > 
> > Could we do >= 10 here for now, and update to this conditional once
> > we've verified that the change does really make it into 10.2?
> > 
> 
> That would break all GCC 10, even if no users of the outline atomics are
> part of the build.
> 
> > If so, I support including it in the stable tag.
> > 
> > /
> >      Leif
> > 
> > > +#pragma GCC target "no-outline-atomics"
> > > +#endif
> > > +#endif
> > > +
> > >   #if defined(_MSC_EXTENSIONS)
> > >   //
> > > -- 
> > > 2.17.1
> > > 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#60136): https://edk2.groups.io/g/devel/message/60136
Mute This Topic: https://groups.io/mt/74396053/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] MdePkg/Include: AARCH64: disable outline atomics on GCC 10.2+

Posted by Ard Biesheuvel 2 days ago
On 5/22/20 2:14 PM, Leif Lindholm wrote:
> On Fri, May 22, 2020 at 14:05:02 +0200, Ard Biesheuvel wrote:
>> On 5/22/20 1:41 PM, Leif Lindholm wrote:
>>> On Fri, May 22, 2020 at 12:12:02 +0200, Ard Biesheuvel wrote:
>>>> GCC 10 enabled a feature by default that was introduced in GCC 9,
>>>> which results in atomic operations to be emitted as function calls
>>>> to intrinsics provided by a runtime library.
>>>>
>>>> Atomics are hardly used in EDK2, which runs on a single CPU anyway,
>>>> and any benefit that would result from reusing library code that
>>>> implements these operations is defeated by the fact that every EDK2
>>>> module will need to have its own copy anyway.
>>>>
>>>> So let's disable this feature on GCC versions that support the
>>>> pragma to do so (GCC 10.2 and up)
>>>>
>>>> Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2723
>>>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
>>>>
>>>> ---
>>>> The GCC support for this pragma has already been pulled into the 10.2
>>>> release branch. I think we should consider adding this to the stable
>>>> tag, so that the issue can easily be resolved by upgrading the compiler.
>>>> Whether we add the intrinsics too is a separate matter, but we can
>>>> revisit that later.
>>>
>>> Hmm. I am just slightly concerned over referencing GCC 10.2 before GCC
>>> 10.2 is released.
>>> Presumably, there will be no ill effects if that pragma is enabled also
>>> on 10.2, we just won't need it? If so ...
>>>
>>
>> No the pragma is only enabled on 10.2 and later. Older GCCs will choke on
>> it.
> 
> Urgh, right. I guess I'm having a "can't read" day.
> 
> Still. That means that if the pragma gets pulled last second from
> 10.2, we now explicitly break builds for 10.2.
> No matter how low the risk of that happening, this doesn't make me
> comfortable.
> 

Indeed. So assuming that we won't take the atomics patch for the stable 
tag, we already know it will be broken for all GCC 10 and up.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#60138): https://edk2.groups.io/g/devel/message/60138
Mute This Topic: https://groups.io/mt/74396053/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH] MdePkg/Include: AARCH64: disable outline atomics on GCC 10.2+

Posted by Leif Lindholm 2 days ago
On Fri, May 22, 2020 at 14:42:34 +0200, Ard Biesheuvel wrote:
> > > > > ---
> > > > > The GCC support for this pragma has already been pulled into the 10.2
> > > > > release branch. I think we should consider adding this to the stable
> > > > > tag, so that the issue can easily be resolved by upgrading the compiler.
> > > > > Whether we add the intrinsics too is a separate matter, but we can
> > > > > revisit that later.
> > > > 
> > > > Hmm. I am just slightly concerned over referencing GCC 10.2 before GCC
> > > > 10.2 is released.
> > > > Presumably, there will be no ill effects if that pragma is enabled also
> > > > on 10.2, we just won't need it? If so ...
> > > > 
> > > 
> > > No the pragma is only enabled on 10.2 and later. Older GCCs will choke on
> > > it.
> > 
> > Urgh, right. I guess I'm having a "can't read" day.
> > 
> > Still. That means that if the pragma gets pulled last second from
> > 10.2, we now explicitly break builds for 10.2.
> > No matter how low the risk of that happening, this doesn't make me
> > comfortable.
> 
> Indeed. So assuming that we won't take the atomics patch for the stable tag,
> we already know it will be broken for all GCC 10 and up.

Which isn't ideal, as we're seeing people picking that up.

I think in a list of not great options I would probably prefer getting
the intrinsics into the stable tag.

/
    Leif

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#60140): https://edk2.groups.io/g/devel/message/60140
Mute This Topic: https://groups.io/mt/74396053/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-