Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Mj9SJ-0000A2-Ke for mharc-grub-devel@gnu.org; Thu, 03 Sep 2009 06:22:15 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mj9SG-00009m-4J for grub-devel@gnu.org; Thu, 03 Sep 2009 06:22:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mj9SB-00009a-KG for grub-devel@gnu.org; Thu, 03 Sep 2009 06:22:11 -0400 Received: from [199.232.76.173] (port=45257 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mj9SB-00009X-Bl for grub-devel@gnu.org; Thu, 03 Sep 2009 06:22:07 -0400 Received: from smarthost02.mail.zen.net.uk ([212.23.3.141]:35635) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mj9SA-0004Ys-GX for grub-devel@gnu.org; Thu, 03 Sep 2009 06:22:06 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost02.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1Mj9S9-0001Jb-GA for grub-devel@gnu.org; Thu, 03 Sep 2009 10:22:05 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1Mj9S8-0003N4-00; Thu, 03 Sep 2009 11:22:04 +0100 Date: Thu, 3 Sep 2009 11:22:04 +0100 From: Colin Watson To: grub-devel@gnu.org Message-ID: <20090903102204.GU13423@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost02-IP: [82.69.40.219] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [PATCH] Build with -fno-dwarf2-cfi-asm X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 10:22:12 -0000 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 * 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]