From: Vladimir Serbinenko Date: Tue, 24 Dec 2013 14:00:46 +0000 (+0100) Subject: Add -Qn to TARGET_CFLAGS if it's supported. X-Git-Tag: grub-2.02-beta2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57bc5d431b3ccf76b4ba81c3bb9bfeba3ce75e1d;p=thirdparty%2Fgrub.git Add -Qn to TARGET_CFLAGS if it's supported. Fixes compilation on cygwin. Reported by: Andrey Borzenkov. Suggested by: Andrey Borzenkov. --- diff --git a/ChangeLog b/ChangeLog index 65e8a1e03..e12dbaefb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2013-12-24 Vladimir Serbinenko + + Add -Qn to TARGET_CFLAGS if it's supported. + Fixes compilation on cygwin. + + Reported by: Andrey Borzenkov. + Suggested by: Andrey Borzenkov. + 2013-12-24 Vladimir Serbinenko Save TARGET_CC version in modinfo.sh. diff --git a/configure.ac b/configure.ac index 2aa2fb3b1..2836fc2cb 100644 --- a/configure.ac +++ b/configure.ac @@ -913,6 +913,15 @@ if test "x$target_cpu" = xarm; then fi fi +AC_CACHE_CHECK([whether option -Qn works], grub_cv_target_cc_qn, [ + CFLAGS="$TARGET_CFLAGS -Qn -Werror" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], + [grub_cv_target_cc_qn=yes], + [grub_cv_target_cc_qn=no])]) +if test "x$grub_cv_target_cc_qn" = xyes; then + TARGET_CFLAGS="$TARGET_CFLAGS -Qn" +fi + # # Compiler features. #