From 0a8cc6e56cdbe534a95a1bafafc8b1b32cdc2d42 Mon Sep 17 00:00:00 2001 From: Nikos Oikonomou Date: Fri, 31 Mar 2023 19:58:16 +0300 Subject: [PATCH] Makefile.uk: Fix unsupported warnings when built with clang Clang (12.0.0) does not recognize the warnings: no-unused-but-set-variable no-maybe-uninitialized no-builtin-declaration-mismatch It would print "unknown warning option" warning messages. These should be enabled only with GCC (tested with 11.3.0). GitHub-Fixes: #1 Co-authored-by: Nikos Oikonomou Signed-off-by: Nikos Oikonomou Signed-off-by: Groute --- Makefile.uk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.uk b/Makefile.uk index 8be4857..5d966b7 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -72,8 +72,9 @@ LIBCOMPILER_RT_CINCLUDES-$(call have_gcc) += -iquote$(LIBCOMPILER_RT_BASE)/inclu ################################################################################ # Global flags ################################################################################ + LIBCOMPILER_RT_SUPPRESS_FLAGS-y += -Wno-unused-parameter -LIBCOMPILER_RT_SUPPRESS_FLAGS-$(have_gcc) += -Wno-builtin-declaration-mismatch +LIBCOMPILER_RT_SUPPRESS_FLAGS-$(call have_gcc) += -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-builtin-declaration-mismatch LIBCOMPILER_RT_CFLAGS-y += $(LIBCOMPILER_RT_SUPPRESS_FLAGS-y) LIBCOMPILER_RT_CXXFLAGS-y += $(LIBCOMPILER_RT_SUPPRESS_FLAGS-y)