]> xenbits.xensource.com Git - unikraft/libs/musl.git/commitdiff
Makefile.uk: Condition flags on clang version
authorAndrei Tatar <andrei@unikraft.io>
Wed, 19 Jul 2023 08:27:11 +0000 (10:27 +0200)
committerUnikraft <monkey@unikraft.io>
Mon, 7 Aug 2023 17:08:50 +0000 (17:08 +0000)
Set warning flags only if the current clang version supports them.

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #61

Makefile.uk

index 33053634562028318384944e015c76844f8c61f5..763db88543e3e3bcdd7f75a8a8bc222c3fc96f38 100644 (file)
@@ -137,14 +137,14 @@ LIBMUSL_CFLAGS-$(call have_gcc) += -Wno-maybe-uninitialized
 LIBMUSL_CFLAGS-y += -Wno-unknown-pragmas
 LIBMUSL_CFLAGS-y += -Wno-missing-braces
 LIBMUSL_CFLAGS-$(call gcc_version_ge,8,0) += -Wno-cast-function-type
-LIBMUSL_CFLAGS-$(call have_clang) += -Wno-cast-function-type
+LIBMUSL_CFLAGS-$(call clang_version_ge,13,0) += -Wno-cast-function-type
 LIBMUSL_CFLAGS-$(call have_gcc) += -Wno-format-contains-nul
 LIBMUSL_CFLAGS-y += -Wno-type-limits
 LIBMUSL_CFLAGS-$(call have_clang) += -Wno-macro-redefined
 LIBMUSL_CFLAGS-$(call have_clang) += -Wno-string-plus-int
 LIBMUSL_CFLAGS-y += -Wno-unused
 LIBMUSL_CFLAGS-$(call have_gcc) += -Wno-old-style-declaration
-LIBMUSL_CFLAGS-$(call have_clang) += -Wno-deprecated-non-prototype
+LIBMUSL_CFLAGS-$(call clang_version_ge,15,0) += -Wno-deprecated-non-prototype
 LIBMUSL_CFLAGS-y += -DUK_LIBC_SYSCALLS=0
 LIBMUSL_CFLAGS-y += -D_XOPEN_SOURCE=700
 LIBMUSL_CFLAGS-y += $(LIBMUSL_HDRS_FLAGS-y)