From 00c05e22f1df2e1568f8dc245d4c879d2943ae64 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Thu, 3 Jan 2013 21:34:34 +0100 Subject: [PATCH] * configure.ac: Extend -Wno-trampolines to host. --- ChangeLog | 4 ++++ configure.ac | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2717f8a2e..087b5c33b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-01-03 Vladimir Serbinenko + + * configure.ac: Extend -Wno-trampolines to host. + 2013-01-03 Vladimir Serbinenko * grub-core/fs/iso9660.c (grub_iso9660_susp_iterate): Avoid hang if diff --git a/configure.ac b/configure.ac index a41f1176d..dde954eae 100644 --- a/configure.ac +++ b/configure.ac @@ -358,6 +358,23 @@ AC_CHECK_HEADER([util.h], [ ]) 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 +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. #