Skip to content

Commit

Permalink
Add -Qn to TARGET_CFLAGS if it's supported.
Browse files Browse the repository at this point in the history
	Fixes compilation on cygwin.

	Reported by: Andrey Borzenkov.
	Suggested by: Andrey Borzenkov.
  • Loading branch information
phcoder committed Dec 24, 2013
1 parent 6a7957f commit 57bc5d4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2013-12-24 Vladimir Serbinenko <[email protected]>

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 <[email protected]>

Save TARGET_CC version in modinfo.sh.
Expand Down
9 changes: 9 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down

0 comments on commit 57bc5d4

Please sign in to comment.