Skip to content

Commit

Permalink
Makefile.uk: Fix unsupported warnings when built with clang
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Nikos Oikonomou <[email protected]>
Signed-off-by: Groute <[email protected]>
  • Loading branch information
ntua-el20014 authored and iAmGroute committed Jun 20, 2023
1 parent 55977d5 commit 0a8cc6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile.uk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0a8cc6e

Please sign in to comment.