From 779dc15bf63287eeae8184602c018b5120ee411f Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 14 Nov 2010 17:13:44 +0100 Subject: [PATCH] * configure.ac: Add -Wno-trampolines when supported. --- ChangeLog | 4 ++++ configure.ac | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1960277c0..c282b309c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-11-14 Vladimir Serbinenko + + * configure.ac: Add -Wno-trampolines when supported. + 2010-11-14 Modestas Vainius * grub-core/kern/emu/getroot.c (grub_util_is_dmraid): Recognise ddf1_ diff --git a/configure.ac b/configure.ac index 1ad3a8e98..a576d1c83 100644 --- a/configure.ac +++ b/configure.ac @@ -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 +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"