Add -Qn to TARGET_CFLAGS if it's supported.

Fixes compilation on cygwin.

	Reported by: Andrey Borzenkov.
	Suggested by: Andrey Borzenkov.
This commit is contained in:
Vladimir Serbinenko 2013-12-24 15:00:46 +01:00
parent 6a7957f9f5
commit 57bc5d431b
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2013-12-24 Vladimir Serbinenko <phcoder@gmail.com>
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 <phcoder@gmail.com>
Save TARGET_CC version in modinfo.sh.

View File

@ -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.
#