From 13d9e99ae772ced3d3f4e825201558c88a5cccd1 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Thu, 25 Sep 2014 13:18:02 +0000 Subject: [PATCH] Handle gcc quirk with parameter checking At least some versions of GCC appear to take any -Wno-foo option without error even if that option is not supported. But they will error out if -Wno-error=foo is used. This sounds like a GCC bug, but we'll work around it and test for the feature both ways. Thanks-to: Matteo Brancaleoni FS-6850 #resolve --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index dbb5a925f2..857a59e7a5 100644 --- a/configure.ac +++ b/configure.ac @@ -342,7 +342,7 @@ if test "$ax_cv_c_compiler_vendor" = "gnu"; then saved_CFLAGS="$CFLAGS" AC_CACHE_CHECK([whether compiler supports -Wno-unused-result], [ac_cv_gcc_supports_w_no_unused_result], [ - CFLAGS="$CFLAGS -Wno-unused-result" + CFLAGS="$CFLAGS -Wno-unused-result -Wno-error=unused-result" AC_TRY_COMPILE([],[return 0;], [ac_cv_gcc_supports_w_no_unused_result=yes], [ac_cv_gcc_supports_w_no_unused_result=no])])