From: Vladimir Serbinenko Date: Thu, 31 Dec 2015 18:20:03 +0000 (+0100) Subject: configure: Add -fno-unwind-tables if supported. X-Git-Tag: 2.02-beta3~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40051fedc33f2ec10924d66ae1371940dce2ca8a;p=thirdparty%2Fgrub.git configure: Add -fno-unwind-tables if supported. Unwind tables are useless for us bt consume space if present. Ensure that they are not. --- diff --git a/configure.ac b/configure.ac index ada6068d9..2e656dbea 100644 --- a/configure.ac +++ b/configure.ac @@ -937,6 +937,17 @@ if test "x$grub_cv_cc_fno_asynchronous_unwind_tables" = xyes; then TARGET_CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables" fi +AC_CACHE_CHECK([whether -fno-unwind-tables works], [grub_cv_cc_fno_unwind_tables], [ + CFLAGS="$TARGET_CFLAGS -fno-unwind-tables" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], + [grub_cv_cc_fno_unwind_tables=yes], + [grub_cv_cc_fno_unwind_tables=no]) +]) + +if test "x$grub_cv_cc_fno_unwind_tables" = xyes; then + TARGET_CFLAGS="$TARGET_CFLAGS -fno-unwind-tables" +fi + AC_ARG_ENABLE([efiemu], [AS_HELP_STRING([--enable-efiemu], [build and install the efiemu runtimes (default=guessed)])])