]> xenbits.xensource.com Git - unikraft/libs/compiler-rt.git/commitdiff
Add compiler dependency to some warnings
authorMarco Schlumpp <marco@unikraft.io>
Fri, 12 May 2023 09:30:53 +0000 (11:30 +0200)
committerUnikraft <monkey@unikraft.io>
Thu, 1 Jun 2023 19:35:08 +0000 (19:35 +0000)
Clang and GCC support a different set of warnings.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #12

Makefile.uk

index 4a32fd1a0cf05a78d4fd54288f11daf18b052859..285b6d3488e4ac328f1837b6c17d033c332e2380 100644 (file)
@@ -70,11 +70,11 @@ CXXINCLUDES-$(CONFIG_LIBCOMPILER_RT) += -I$(LIBCOMPILER_RT_SRC)/lib/builtins
 ################################################################################
 # Global flags
 ################################################################################
-LIBCOMPILER_RT_SUPPRESS_FLAGS += -Wno-unused-parameter
-LIBCOMPILER_RT_SUPPRESS_FLAGS += -Wno-builtin-declaration-mismatch
+LIBCOMPILER_RT_SUPPRESS_FLAGS-y += -Wno-unused-parameter
+LIBCOMPILER_RT_SUPPRESS_FLAGS-$(have_gcc) += -Wno-builtin-declaration-mismatch
 
-LIBCOMPILER_RT_CFLAGS-y   += $(LIBCOMPILER_RT_SUPPRESS_FLAGS)
-LIBCOMPILER_RT_CXXFLAGS-y += $(LIBCOMPILER_RT_SUPPRESS_FLAGS)
+LIBCOMPILER_RT_CFLAGS-y   += $(LIBCOMPILER_RT_SUPPRESS_FLAGS-y)
+LIBCOMPILER_RT_CXXFLAGS-y += $(LIBCOMPILER_RT_SUPPRESS_FLAGS-y)
 
 ################################################################################
 # Library sources