+2013-01-03 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * configure.ac: Extend -Wno-trampolines to host.
+
2013-01-03 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/iso9660.c (grub_iso9660_susp_iterate): Avoid hang if
])
AC_SUBST([LIBUTIL])
+AC_CACHE_CHECK([whether -Wno-trampolines work], [grub_cv_host_cc_wnotrampolines], [
+ SAVED_CFLAGS="$CFLAGS"
+ # Test for -Wtrampolines rather than -Wno-trampolines to reduce confusion
+ # in the event of later failures (since -Wno-* is always accepted, but
+ # produces a diagnostic if something else is wrong).
+ CFLAGS="$HOST_CFLAGS -Wtrampolines"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+int va_arg_func (int fixed, va_list args);]], [[]])],
+ [grub_cv_host_cc_wnotrampolines=yes],
+ [grub_cv_host_cc_wnotrampolines=no])
+ CFLAGS="$SAVED_CFLAGS"
+])
+
+if test x"$grub_host_cv_cc_wnotrampolines" = xyes ; then
+ HOST_CFLAGS="$HOST_CFLAGS -Wno-trampolines"
+fi
+
#
# Check for host and build compilers.
#