[PATCH 07/59] posix: Suppress -Wignored-attributes when building for confstr.c with clang
Adhemerval Zanella
adhemerval.zanella@linaro.org
Fri Oct 17 19:12:42 GMT 2025
clang issues:
confstr.c:293:1: error: alias will always resolve to __GI___confstr even if weak definition of __GI_confstr is overridden [-Werror,-Wignored-attributes]
293 | libc_hidden_def (confstr)
| ^
./../include/libc-symbols.h:549:32: note: expanded from macro 'libc_hidden_def'
549 | # define libc_hidden_def(name) hidden_def (name)
| ^
./../include/libc-symbols.h:468:29: note: expanded from macro 'hidden_def'
468 | # define hidden_def(name) __hidden_ver1(__GI_##name, name, name);
| ^
./../include/libc-symbols.h:460:3: note: expanded from macro '__hidden_ver1'
460 | __hidden_ver2 (, local, internal, name)
| ^
./../include/libc-symbols.h:465:20: note: expanded from macro '__hidden_ver2'
465 | __attribute__((alias (__hidden_asmname (#local)))) \
The weak alias is the intention of the macro.
---
posix/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/posix/Makefile b/posix/Makefile
index f6421e5379..3f6df25d86 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -600,6 +600,7 @@ CFLAGS-execvp.os = -fomit-frame-pointer
CFLAGS-execlp.os = -fomit-frame-pointer
CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-fork.c = $(libio-mtsafe) $(config-cflags-wno-ignored-attributes)
+CFLAGS-confstr.c += $(config-cflags-wno-ignored-attributes)
tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
--none random --col --color --colour
--
2.43.0
More information about the Libc-alpha
mailing list