From: Colin Watson <cjwatson@ubuntu.com>
To: grub-devel@gnu.org
Subject: [PATCH] Build with -fno-dwarf2-cfi-asm
Date: Thu, 3 Sep 2009 11:22:04 +0100 [thread overview]
Message-ID: <20090903102204.GU13423@riva.ucam.org> (raw)
I'd like to commit this for 1.97; it's important for users of recent
distributions that use GCC 4.4 by default (which is the current release
series of GCC). Otherwise, the core is too big to embed when using LVM
and RAID (https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/423412).
Any objections?
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.
Index: configure.ac
===================================================================
--- configure.ac (revision 2561)
+++ configure.ac (working copy)
@@ -246,6 +246,21 @@
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], [
+ 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])
+ ])
+
+ 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
--
Colin Watson [cjwatson@ubuntu.com]
next reply other threads:[~2009-09-03 10:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-03 10:22 Colin Watson [this message]
2009-09-03 14:23 ` [PATCH] Build with -fno-dwarf2-cfi-asm Colin Watson
2009-09-03 14:47 ` Robert Millan
2009-09-03 15:27 ` Colin Watson
2009-09-03 15:38 ` Robert Millan
2009-09-03 23:02 ` Colin Watson
-- strict thread matches above, loose matches on Subject: below --
2009-03-23 19:25 Kyle McMartin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090903102204.GU13423@riva.ucam.org \
--to=cjwatson@ubuntu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.