From: Andrei Tatar Date: Wed, 19 Jul 2023 08:27:11 +0000 (+0200) Subject: Makefile.uk: Condition flags on clang version X-Git-Tag: RELEASE-0.14.0~10 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=722afb8fde74f05ec8a75fe9aea71424fa73e8ef;p=unikraft%2Flibs%2Fmusl.git Makefile.uk: Condition flags on clang version Set warning flags only if the current clang version supports them. Signed-off-by: Andrei Tatar Reviewed-by: Stefan Jumarea Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #61 --- diff --git a/Makefile.uk b/Makefile.uk index 3305363..763db88 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -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)