]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-09-03 Colin Watson <cjwatson@ubuntu.com>
authorcjwatson <cjwatson@localhost>
Thu, 3 Sep 2009 23:00:25 +0000 (23:00 +0000)
committercjwatson <cjwatson@localhost>
Thu, 3 Sep 2009 23:00:25 +0000 (23:00 +0000)
* configure.ac: By default, GCC 4.4 generates .eh_frame sections
containing unwind information in some cases where it previously did
not. Use -fno-dwarf2-cfi-asm if available to restore the old
behaviour. See http://patchwork.kernel.org/patch/8555/ for related
discussion.

ChangeLog
configure.ac

index 55f059bba3a6aa34541fc10284e182d817da3f98..bafb163e539e33b042e1f7d41af1a4a8df74b820 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-09-03  Colin Watson  <cjwatson@ubuntu.com>
+
+       * configure.ac: By default, GCC 4.4 generates .eh_frame sections
+       containing unwind information in some cases where it previously did
+       not. Use -fno-dwarf2-cfi-asm if available to restore the old
+       behaviour. See http://patchwork.kernel.org/patch/8555/ for related
+       discussion.
+
 2009-09-02  Yves BLUSSEAU  <blusseau@zetam.org>
 
        Embedding loadenv module into grub-emu
index 3c4c6dce6f96fa319377b8c713e2410058617259..59e046363aed724654abe0324e323dfe41e8f24f 100644 (file)
@@ -246,6 +246,23 @@ if test "x$TARGET_CFLAGS" = x; then
       TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
     fi
   fi
+
+  # By default, GCC 4.4 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-dwarf2-cfi-asm works], [grub_cv_cc_fno_dwarf2_cfi_asm], [
+    SAVE_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -fno-dwarf2-cfi-asm"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+                     [grub_cv_cc_fno_dwarf2_cfi_asm=yes],
+                     [grub_cv_cc_fno_dwarf2_cfi_asm=no])
+    CFLAGS="$SAVE_CFLAGS"
+  ])
+
+  if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then
+    TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
+  fi
 fi
 
 grub_apple_target_cc