[Buildroot] [PATCH 2/2] package/attr: affected by gcc bug 101766

Giulio Benetti giulio.benetti at benettiengineering.com
Mon Jan 15 22:19:45 UTC 2024


FYI this could be fixed as it's been done in libfuse by checking in
Makefile if symver is supported and emitting:
-DHAVE_SYMVER_ATTRIBUTE

and then:
https://github.com/libfuse/libfuse/blob/master/lib/fuse_misc.h#L18-L26

using:
__asm__("\t.symver " sym1 "," sym2);
instead of:
__attribute__ ((symver (sym2)))

Now that I'm getting deeper I'm seeing the exact same problem coming
from the gcc bug 101766, that __has_attribute() is broken for many
attributes including symver and that requires a runtime check to
know if symver is support or not.

Again, it was just FYI, the patch looks good to me. If someone wants
to fix it is welcome.

Best regards
-- 
Giulio Benetti
CEO&CTO at Benetti Engineering sas

On 15/01/24 23:08, Giulio Benetti wrote:
> Hi Fabrice,
> 
> On 15/01/24 22:34, Fabrice Fontaine wrote:
>> attr is affected by gcc bug 101766 since version 1.5.2 and
>> https://git.savannah.nongnu.org/cgit/attr.git/commit/?id=11b9069098b4d4c23efb06c9457a085b784354d4
>> resulting in the following build failure on microblaze since commit
>> b31b91296e7f985b909f104f06a098adddef1fea:
>>
>> libattr/syscalls.c:133:10: error: symver is only supported on ELF 
>> platforms
>>    133 | # pragma GCC visibility pop
>>        |          ^~~
> 
> Please add:
> So let's disable package attr and packages depending on it.
> 
>>
>> Fixes:
>>   - 
>> http://autobuild.buildroot.org/results/29c76e02becedf922bd7dc0533338c078bf77d2a
>>
>> Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
>> ---
>>   package/acl/Config.in     | 4 ++++
>>   package/attr/Config.in    | 4 ++++
>>   package/systemd/Config.in | 4 ++++
>>   3 files changed, 12 insertions(+)
>>
>> diff --git a/package/acl/Config.in b/package/acl/Config.in
>> index 92f2251878..132c6e8ad3 100644
>> --- a/package/acl/Config.in
>> +++ b/package/acl/Config.in
>> @@ -1,5 +1,6 @@
>>   config BR2_PACKAGE_ACL
>>       bool "acl"
>> +    depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_101766 # attr
>>       select BR2_PACKAGE_ATTR
>>       help
>>         POSIX Access Control Lists, which are used to define more
>> @@ -8,3 +9,6 @@ config BR2_PACKAGE_ACL
>>         This package also provides libacl.
>>         http://savannah.nongnu.org/projects/acl
>> +
>> +comment "acl needs a toolchain not affected by GCC bug 101766"
>> +    depends on BR2_TOOLCHAIN_HAS_GCC_BUG_101766
>> diff --git a/package/attr/Config.in b/package/attr/Config.in
>> index 554772b75d..b9d9f57d8f 100644
>> --- a/package/attr/Config.in
>> +++ b/package/attr/Config.in
>> @@ -1,7 +1,11 @@
>>   config BR2_PACKAGE_ATTR
>>       bool "attr"
>> +    depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_101766
>>       help
>>         Commands for Manipulating Filesystem Extended Attributes.
>>         This package also provides libattr.
>>         http://savannah.nongnu.org/projects/attr
>> +
>> +comment "attr needs a toolchain not affected by GCC bug 101766"
>> +    depends on BR2_TOOLCHAIN_HAS_GCC_BUG_101766
>> diff --git a/package/systemd/Config.in b/package/systemd/Config.in
>> index 859332d9e4..f0f92b78b0 100644
>> --- a/package/systemd/Config.in
>> +++ b/package/systemd/Config.in
>> @@ -451,6 +451,7 @@ config BR2_PACKAGE_SYSTEMD_RFKILL
>>   config BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT
>>       bool "enable SMACK support"
>> +    depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_101766 # attr
>>       select BR2_PACKAGE_ATTR
>>       select BR2_PACKAGE_SMACK
>>       help
>> @@ -463,6 +464,9 @@ config BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT
>>         When this feature is enabled, Systemd mounts smackfs and
>>         manages security labels for sockets.
>> +comment "SMACK support needs a toolchain not affected by GCC bug 101766"
>> +    depends on BR2_TOOLCHAIN_HAS_GCC_BUG_101766
>> +
>>   config BR2_PACKAGE_SYSTEMD_SYSEXT
>>       bool "enable sysext support"
>>       help
> 
> I've found that following dependency is missing:
> BR2_PACKAGE_LUA_FLU
> 
> Do you mind sending a V2 with that dependency and rewording a bit like
> I've pointed above?
> 
> With those included you can add:
> Reviewed-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
> 
> Thank you!
> 
> Best regards




More information about the buildroot mailing list