diff --git a/Makefile b/Makefile index 63134117..cfe81d10 100644 --- a/Makefile +++ b/Makefile @@ -621,7 +621,7 @@ PIC_OBJS = \ # Note: --allow-undefined-file=linker-provided-symbols.txt is # a workaround for https://github.com/llvm/llvm-project/issues/103592 $(SYSROOT_LIB)/libc.so: $(OBJDIR)/libc.so.a $(BUILTINS_LIB) - $(CC) $(CFLAGS) -nodefaultlibs -shared --sysroot=$(SYSROOT) \ + $(CC) $(filter-out -W%, $(CFLAGS)) -nodefaultlibs -shared --sysroot=$(SYSROOT) \ -o $@ -Wl,--whole-archive $< -Wl,--no-whole-archive $(BUILTINS_LIB) \ -Wl,--allow-undefined-file=linker-provided-symbols.txt