]> git.proxmox.com Git - grub2.git/commitdiff
* configure.ac: Extend -Wno-trampolines to host.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 3 Jan 2013 20:34:34 +0000 (21:34 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 3 Jan 2013 20:34:34 +0000 (21:34 +0100)
ChangeLog
configure.ac

index 2717f8a2e9999ddb89dbd2b4de42fc3b98370361..087b5c33b4a109b75423008c3651aa07f9a87c43 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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
index a41f1176d4b917bdaf916e513dad0242526cf502..dde954eaec33d7bad603eea548e4c55d7ffe16f8 100644 (file)
@@ -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 <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.
 #