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 <mbrancaleoni@voismart.it> FS-6850 #resolve
This commit is contained in:
parent
051772e4ae
commit
13d9e99ae7
|
@ -342,7 +342,7 @@ if test "$ax_cv_c_compiler_vendor" = "gnu"; then
|
||||||
saved_CFLAGS="$CFLAGS"
|
saved_CFLAGS="$CFLAGS"
|
||||||
AC_CACHE_CHECK([whether compiler supports -Wno-unused-result],
|
AC_CACHE_CHECK([whether compiler supports -Wno-unused-result],
|
||||||
[ac_cv_gcc_supports_w_no_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_TRY_COMPILE([],[return 0;],
|
||||||
[ac_cv_gcc_supports_w_no_unused_result=yes],
|
[ac_cv_gcc_supports_w_no_unused_result=yes],
|
||||||
[ac_cv_gcc_supports_w_no_unused_result=no])])
|
[ac_cv_gcc_supports_w_no_unused_result=no])])
|
||||||
|
|
Loading…
Reference in New Issue