diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index ef4e6bab544..d779fc4d163 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -208,8 +208,14 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS], WARNINGS_ENABLE_ALL="-Wall -Wextra -Wformat=2" WARNINGS_ENABLE_ADDITIONAL_JVM="-Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wunused-value -Woverloaded-virtual" - # DISABLED_WARNINGS="unused-parameter unused" - DISABLED_WARNINGS="unused-parameter unused deprecated-declarations deprecated-non-prototype" + if test "x$OPENJDK_TARGET_OS" = xmacosx; then + # With clang >= XX on macosx add '-Wno-deprecated-declarations' and '-Wno-deprecated-non-prototyupe' + AC_MSG_RESULT([Adding -Wno-deprecated-declarations and -Wno-deprecated-non-protype on clang/macosx with version $CLANG_VERSION_NUMBER $CLANG_VERSION_STRING]) + DISABLED_WARNINGS="unused-parameter unused deprecated-declarations deprecated-non-prototype" + else + DISABLED_WARNINGS="unused-parameter unused" + fi + ;; xlc)