]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* configure.ac: Add -Wno-trampolines when supported.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 14 Nov 2010 16:13:44 +0000 (17:13 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 14 Nov 2010 16:13:44 +0000 (17:13 +0100)
ChangeLog
configure.ac

index 1960277c097f664580c429375a7d31904d3a2d3a..c282b309c4d68bc3efa20e8e6e101150333facc3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-14  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * configure.ac: Add -Wno-trampolines when supported.
+
 2010-11-14  Modestas Vainius <modax@debian.org>
 
        * grub-core/kern/emu/getroot.c (grub_util_is_dmraid): Recognise ddf1_
index 1ad3a8e98325eeda589e670b6c3d4c96f3f15e54..a576d1c83f6383df4b062a9653d0407b252a9324 100644 (file)
@@ -668,6 +668,20 @@ if test x"$grub_cv_cc_isystem" = xyes ; then
 fi
 fi
 
+AC_CACHE_CHECK([whether -Wno-trampolines work], [grub_cv_cc_wnotrampolines], [
+  SAVED_CFLAGS="$CFLAGS"
+  CFLAGS="$TARGET_CFLAGS -Wno-trampolines"
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+int va_arg_func (int fixed, va_list args);]], [[]])],
+      [grub_cv_cc_wnotrampolines=yes],
+      [grub_cv_cc_wnotrampolines=no])
+  CFLAGS="$SAVED_CFLAGS"
+])
+
+if test x"$grub_cv_cc_wnotrampolines" = xyes ; then
+  TARGET_CFLAGS="$TARGET_CFLAGS -Wno-trampolines"
+fi
+
 # Restore the flags.
 CC="$tmp_CC"
 CFLAGS="$tmp_CFLAGS"