From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MjDE0-0004il-7A for mharc-grub-devel@gnu.org; Thu, 03 Sep 2009 10:23:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjDDy-0004hz-9q for grub-devel@gnu.org; Thu, 03 Sep 2009 10:23:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjDDt-0004fs-J5 for grub-devel@gnu.org; Thu, 03 Sep 2009 10:23:41 -0400 Received: from [199.232.76.173] (port=58060 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjDDt-0004fl-Bb for grub-devel@gnu.org; Thu, 03 Sep 2009 10:23:37 -0400 Received: from smarthost01.mail.zen.net.uk ([212.23.3.140]:58474) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MjDDs-0003Di-RX for grub-devel@gnu.org; Thu, 03 Sep 2009 10:23:37 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost01.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1MjDDr-00071g-Vx for grub-devel@gnu.org; Thu, 03 Sep 2009 14:23:36 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1MjDDr-00058j-00; Thu, 03 Sep 2009 15:23:35 +0100 Date: Thu, 3 Sep 2009 15:23:35 +0100 From: Colin Watson To: grub-devel@gnu.org Message-ID: <20090903142335.GA19530@riva.ucam.org> References: <20090903102204.GU13423@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090903102204.GU13423@riva.ucam.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost01-IP: [82.69.40.219] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [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 14:23:42 -0000 I broke gcc < 4.4 by mistake, sorry. Updated patch follows. With this patch and './grub-mkimage -d . -o tmp biosdisk ext2 part_msdos raid mdraid lvm fs_uuid': gcc 4.3: 30370 bytes gcc 4.4: 30331 bytes (Before this patch, gcc 4.4 produced an image that was 33000-some-odd bytes.) 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,23 @@ 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 -- Colin Watson [cjwatson@ubuntu.com]