diff --git a/debian/changelog b/debian/changelog index 342b56466..1a97c5482 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +grub2 (1.99-16) UNRELEASED; urgency=low + + * Backport from upstream: + - Build with -fno-asynchronous-unwind-tables to save space (closes: + #662787). + + -- Colin Watson Tue, 06 Mar 2012 12:44:38 +0000 + grub2 (1.99-15) unstable; urgency=low [ Adam Conrad ] diff --git a/debian/patches/gcc_4_6_space.patch b/debian/patches/gcc_4_6_space.patch new file mode 100644 index 000000000..7aaa5361f --- /dev/null +++ b/debian/patches/gcc_4_6_space.patch @@ -0,0 +1,33 @@ +Description: Build with -fno-asynchronous-unwind-tables to save space +Author: Vladimir Serbinenko +Origin: upstream, http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3589 +Last-Update: 2012-03-06 + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -415,6 +415,23 @@ + fi + 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" diff --git a/debian/patches/series b/debian/patches/series index bca600d00..2850c9c03 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -35,3 +35,4 @@ handle_new_autotools.patch efi_disk_cache.patch bash-completion_identifiers.patch mkconfig_gnumach.patch +gcc_4_6_space.patch