diff -r a1db3b482137 -r c0a98357f847 common/autoconf/flags.m4 --- a/common/autoconf/flags.m4 Tue Nov 24 15:36:32 2015 +0100 +++ b/common/autoconf/flags.m4 Tue Nov 24 15:46:04 2015 +0100 @@ -980,6 +980,19 @@ DISABLE_WARNING_PREFIX= fi CFLAGS_WARNINGS_ARE_ERRORS="-Werror" + # Repeate the check for the BUILD_CC + CC_OLD="$CC" + CC="$BUILD_CC" + FLAGS_COMPILER_CHECK_ARGUMENTS([-Wno-this-is-a-warning-that-do-not-exist], + [BUILD_CC_CAN_DISABLE_WARNINGS=true], + [BUILD_CC_CAN_DISABLE_WARNINGS=false] + ) + if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then + BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-" + else + BUILD_CC_DISABLE_WARNING_PREFIX= + fi + CC="$CC_OLD" ;; clang) DISABLE_WARNING_PREFIX="-Wno-"