From 8d98c7c00f3f06545de9e5ce5cf778d2ab2450a4 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Fri, 11 Mar 2022 10:40:44 -0300 Subject: configure: Use -Wno-ignored-attributes if compiler warns about multiple aliases 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. However, this is a common pattern for weak_alias, where multiple alias are set to same symbol. Reviewed-by: Fangrui Song --- libio/Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'libio') diff --git a/libio/Makefile b/libio/Makefile index 3a02611020..64398ab1ee 100644 --- a/libio/Makefile +++ b/libio/Makefile @@ -112,18 +112,18 @@ CFLAGS-getchar.c += -fexceptions CFLAGS-getwc.c += -fexceptions CFLAGS-getwchar.c += -fexceptions CFLAGS-iofclose.c += -fexceptions -CFLAGS-iofflush.c += -fexceptions +CFLAGS-iofflush.c += -fexceptions $(config-cflags-wno-ignored-attributes) CFLAGS-iofgetpos64.c += -fexceptions CFLAGS-iofgetpos.c += -fexceptions CFLAGS-iofgets.c += -fexceptions CFLAGS-iofgetws.c += -fexceptions -CFLAGS-iofputs.c += -fexceptions +CFLAGS-iofputs.c += -fexceptions $(config-cflags-wno-ignored-attributes) CFLAGS-iofputws.c += -fexceptions CFLAGS-iofread.c += -fexceptions CFLAGS-iofsetpos64.c += -fexceptions CFLAGS-iofsetpos.c += -fexceptions CFLAGS-ioftell.c += -fexceptions -CFLAGS-iofwrite.c += -fexceptions +CFLAGS-iofwrite.c += -fexceptions $(config-cflags-wno-ignored-attributes) CFLAGS-iogetdelim.c += -fexceptions CFLAGS-iogetline.c += -fexceptions CFLAGS-iogets.c += -fexceptions @@ -153,6 +153,14 @@ CFLAGS-oldiofopen.c += -fexceptions CFLAGS-iofopen.c += -fexceptions CFLAGS-iofopen64.c += -fexceptions CFLAGS-oldtmpfile.c += -fexceptions +CFLAGS-fileno.c += $(config-cflags-wno-ignored-attributes) +CFLAGS-feof_u.c += $(config-cflags-wno-ignored-attributes) +CFLAGS-ferror_u.c += $(config-cflags-wno-ignored-attributes) +CFLAGS-getc_u.c += $(config-cflags-wno-ignored-attributes) +CFLAGS-iofflush_u.c += $(config-cflags-wno-ignored-attributes) +CFLAGS-putc_u.c += $(config-cflags-wno-ignored-attributes) +CFLAGS-iofgets_u.c += $(config-cflags-wno-ignored-attributes) +CFLAGS-iofputs_u.c += $(config-cflags-wno-ignored-attributes) # XXX Do we need filedoalloc and wfiledoalloc? Others? CFLAGS-tst_putwc.c += -DOBJPFX=\"$(objpfx)\" -- cgit 1.4.1