[PATCH 21/59] Use $(config-cflags-wno-ignored-attributes) on some files

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Tue Oct 21 11:13:42 GMT 2025



On 20/10/25 16:30, Sam James wrote:
> Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
> 
>> clang emits an warning when a double alias redirection is used, to warn
>> the the original symbol will be used even when weak definition is
>> overridden.  Howerver, this is a common pattern for weak_alias, where
>> multiple alias are set to same symbol.
>> ---
> 
> 
> I worry a bit about this masking other issues, but
> -Wno-ignored-attributes doesn't seem to take an argument like
> -Wno-attributes=XYZ does?
> 
> We already do it in other places though.
> 
> So, OK, but give time to see if there's a better idea.

Florian has suggested add a new macro [1] to avoid generating weak
definitions for shared builds.  I will check how hard it would be,
it is better than blindly disable the warning.

[1] https://sourceware.org/pipermail/libc-alpha/2025-October/171258.html

> 
> Reviewed-by: Sam James <sam@gentoo.org>
> 
>>  math/Makefile   | 14 ++++++++++++++
>>  string/Makefile |  2 ++
>>  2 files changed, 16 insertions(+)
>>
>> diff --git a/math/Makefile b/math/Makefile
>> index 57f1e4af28..66df19f845 100644
>> --- a/math/Makefile
>> +++ b/math/Makefile
>> @@ -1752,6 +1752,20 @@ CFLAGS-s_y0f.c += -fno-builtin-y0f32
>>  CFLAGS-s_y1f.c += -fno-builtin-y1f32
>>  CFLAGS-s_ynf.c += -fno-builtin-ynf32
>>  
>> +CFLAGS-fclrexcpt.c += $(config-cflags-wno-ignored-attributes)
>> +CFLAGS-ftestexcept.c += $(config-cflags-wno-ignored-attributes)
>> +CFLAGS-s_fabsf128.c += $(config-cflags-wno-ignored-attributes)
>> +CFLAGS-s_sincos.c += $(config-cflags-wno-ignored-attributes)
>> +CFLAGS-w_exp10_compat.c += $(config-cflags-wno-ignored-attributes)
>> +CFLAGS-fraiseexcpt.c += $(config-cflags-wno-ignored-attributes)
>> +CFLAGS-fegetround.c += $(config-cflags-wno-ignored-attributes)
>> +CFLAGS-fesetround.c += $(config-cflags-wno-ignored-attributes)
>> +CFLAGS-fegetenv.c += $(config-cflags-wno-ignored-attributes)
>> +CFLAGS-fesetenv.c += $(config-cflags-wno-ignored-attributes)
>> +CFLAGS-feholdexcpt.c += $(config-cflags-wno-ignored-attributes)
>> +CFLAGS-s_exp10m1f.c += $(config-cflags-wno-ignored-attributes)
>> +CFLAGS-s_exp2m1f.c += $(config-cflags-wno-ignored-attributes)
>> +
>>  # These files quiet sNaNs in a way that is optimized away without
>>  # -fsignaling-nans.
>>  CFLAGS-s_modf.c += $(config-cflags-signaling-nans)
>> diff --git a/string/Makefile b/string/Makefile
>> index d842ae0457..2aca9b2e72 100644
>> --- a/string/Makefile
>> +++ b/string/Makefile
>> @@ -293,6 +293,8 @@ CFLAGS-memchr.c += $(config-cflags-wno-ignored-attributes)
>>  CFLAGS-mempcpy.c += $(config-cflags-wno-ignored-attributes)
>>  CFLAGS-stpcpy.c += $(config-cflags-wno-ignored-attributes)
>>  CFLAGS-strnlen.c += $(config-cflags-wno-ignored-attributes)
>> +CFLAGS-ffsll.c += $(config-cflags-wno-ignored-attributes)
>> +CFLAGS-strlen.c += $(config-cflags-wno-ignored-attributes)
>>  
>>  ifeq ($(run-built-tests),yes)
>>  $(objpfx)tst-svc-cmp.out: tst-svc.expect $(objpfx)tst-svc.out



More information about the Libc-alpha mailing list