]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* configure.ac: Add -fno-asynchronous-unwind-tables.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 12 Nov 2011 18:18:42 +0000 (19:18 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 12 Nov 2011 18:18:42 +0000 (19:18 +0100)
ChangeLog
configure.ac

index 3d8bd25e701666f40a1687f1684551ece6fee5a6..409a41ca5a2bb823bc47bdbed7a1499aff8f2ed8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-11-12  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * configure.ac: Add -fno-asynchronous-unwind-tables.
+
 2011-11-12  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Move assembly code to C by using intwrap. It increases core size
index 3d6cc9a9ead08f21eef0c0db2334ca57b135b812..7699e833027be25dfa81e9c89fe3d7c7d1cc119d 100644 (file)
@@ -413,6 +413,23 @@ if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then
   TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
 fi
 
+# By default, GCC 4.6 generates .eh_frame sections containing unwind
+# information in some cases where it previously did not. GRUB doesn't need
+# these and they just use up vital space. Restore the old compiler
+# behaviour.
+AC_CACHE_CHECK([whether -fno-asynchronous-unwind-tables works], [grub_cv_cc_fno_asynchronous_unwind_tables], [
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -fno-dwarf2-cfi-asm"
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+      [grub_cv_cc_fno_asynchronous_unwind_tables=yes],
+      [grub_cv_cc_fno_asynchronous_unwind_tables=no])
+  CFLAGS="$SAVE_CFLAGS"
+])
+
+if test "x$grub_cv_cc_fno_asynchronous_unwind_tables" = xyes; then
+  TARGET_CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
+fi
+
 grub_apple_target_cc
 if test x$grub_cv_apple_target_cc = xyes ; then
   TARGET_CPPFLAGS="$TARGET_CPPFLAGS -DAPPLE_CC=1"