From: Simon Kuenzer Date: Thu, 31 Aug 2023 09:22:34 +0000 (+0200) Subject: Assign `-Wno-keyword-compat` to clang only X-Git-Tag: RELEASE-0.15.0~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=22dbf3d4478cacdb5bf0ee51841419e9a921c649;p=unikraft%2Flibs%2Flibcxx.git Assign `-Wno-keyword-compat` to clang only The compiler flag `-Wno-keyword-compat` is not recognized by GCC, but by clang. Although it does not harm the resulting compilation unit (GCC has a special handling of `-Wno-*` flags), an additional warning message is issued if a compilation unit fails or produces other warnings: ``` At global scope: cc1plus: note: unrecognized command-line option '-Wno-keyword-compat' may have been intended to silence earlier diagnostics ``` This commit assigns `-Wno-keyword-compat` to clang only. Signed-off-by: Simon Kuenzer Reviewed-by: Marco Schlumpp Reviewed-by: Stefan Jumarea Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #35 --- diff --git a/Makefile.uk b/Makefile.uk index 9a3f1c9..9261779 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -97,7 +97,7 @@ LIBCXX_SUPPRESS_FLAGS-y += -Wno-parentheses LIBCXX_SUPPRESS_FLAGS-y += -Wno-deprecated-declarations LIBCXX_SUPPRESS_FLAGS-y += -Wno-array-bounds LIBCXX_SUPPRESS_FLAGS-y += -Wno-cpp -LIBCXX_SUPPRESS_FLAGS-y += -Wno-keyword-compat +LIBCXX_SUPPRESS_FLAGS-$(call have_clang) += -Wno-keyword-compat LIBCXX_SUPPRESS_FLAGS-$(call have_clang) += -Wno-user-defined-literals LIBCXX_SUPPRESS_FLAGS-$(call have_gcc) += -Wno-stringop-overflow LIBCXX_SUPPRESS_FLAGS-$(call have_gcc) += -Wno-alloc-size-larger-than