Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FUc3I-0003Bu-J1 for mharc-grub-devel@gnu.org; Sat, 15 Apr 2006 00:06:28 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FUc3H-0003B7-0S for grub-devel@gnu.org; Sat, 15 Apr 2006 00:06:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FUc3G-0003Ac-4r for grub-devel@gnu.org; Sat, 15 Apr 2006 00:06:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FUc3F-0003AS-Uo for grub-devel@gnu.org; Sat, 15 Apr 2006 00:06:26 -0400 Received: from [209.86.89.66] (helo=elasmtp-spurfowl.atl.sa.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FUc3N-0007wL-8l for grub-devel@gnu.org; Sat, 15 Apr 2006 00:06:33 -0400 Received: from [63.246.184.80] (helo=[192.168.0.101]) by elasmtp-spurfowl.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1FUc3B-0003Gj-LN for grub-devel@gnu.org; Sat, 15 Apr 2006 00:06:21 -0400 Mime-Version: 1.0 (Apple Message framework v623) To: The development of GRUB 2 Message-Id: <3ee0a8f18ea58d3a5094266f8e7f8e42@penguinppc.org> Content-Type: multipart/mixed; boundary=Apple-Mail-4--736928821 From: Hollis Blanchard Date: Fri, 14 Apr 2006 23:06:35 -0500 X-Mailer: Apple Mail (2.623) X-ELNK-Trace: 77a46389d001b1f223bcf3e39c2f8b5f1aa676d7e74259b7b3291a7d08dfec792b5035d62dd687e6858877a5bb49c3d5350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 63.246.184.80 Subject: [ppc patch] link with -m32 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: Sat, 15 Apr 2006 04:06:27 -0000 --Apple-Mail-4--736928821 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Some 64-bit PowerPC compilers default to 64-bit output. Right now we're building all the object files with -m32, but then the linker complains when it tries to link a 64-bit grubof. We need to add -m32 to LDFLAGS as well as CFLAGS. Could somebody please confirm that this patch doesn't break x86-64? -Hollis --Apple-Mail-4--736928821 Content-Transfer-Encoding: 7bit Content-Type: text/plain; x-unix-mode=0644; name="grub-biarch-link.txt" Content-Disposition: attachment; filename=grub-biarch-link.txt Index: Makefile.in =================================================================== RCS file: /sources/grub/grub2/Makefile.in,v retrieving revision 1.17 diff -u -p -r1.17 Makefile.in --- Makefile.in 3 Jan 2006 17:58:02 -0000 1.17 +++ Makefile.in 15 Apr 2006 03:59:21 -0000 @@ -56,6 +56,7 @@ mkinstalldirs = $(srcdir)/mkinstalldirs CC = @CC@ CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ CPPFLAGS = -I. -Iinclude -I$(srcdir)/include -Wall -W BUILD_CC = @BUILD_CC@ BUILD_CFLAGS = -g -O2 Index: configure =================================================================== RCS file: /sources/grub/grub2/configure,v retrieving revision 1.31 diff -u -p -r1.31 configure --- configure 2 Apr 2006 08:53:31 -0000 1.31 +++ configure 15 Apr 2006 03:59:22 -0000 @@ -2907,6 +2907,8 @@ echo "${ECHO_T}$falign_loop_flag" >&6 if test "x$biarch32" = x1; then tmp_CFLAGS="$tmp_CFLAGS -m32" + LDFLAGS="$tmp_LDFLAGS -m32" + fi CFLAGS="$tmp_CFLAGS" Index: configure.ac =================================================================== RCS file: /sources/grub/grub2/configure.ac,v retrieving revision 1.22 diff -u -p -r1.22 configure.ac --- configure.ac 2 Apr 2006 08:53:31 -0000 1.22 +++ configure.ac 15 Apr 2006 03:59:22 -0000 @@ -89,6 +89,8 @@ if test "x$default_CFLAGS" = xyes; then if test "x$biarch32" = x1; then tmp_CFLAGS="$tmp_CFLAGS -m32" + LDFLAGS="$tmp_LDFLAGS -m32" + AC_SUBST(LDFLAGS) fi CFLAGS="$tmp_CFLAGS" Index: conf/powerpc-ieee1275.rmk =================================================================== RCS file: /sources/grub/grub2/conf/powerpc-ieee1275.rmk,v retrieving revision 1.52 diff -u -p -r1.52 powerpc-ieee1275.rmk --- conf/powerpc-ieee1275.rmk 25 Dec 2005 15:59:50 -0000 1.52 +++ conf/powerpc-ieee1275.rmk 15 Apr 2006 03:59:23 -0000 @@ -69,7 +69,7 @@ grubof_SOURCES = kern/powerpc/ieee1275/c grubof_HEADERS = grub/powerpc/ieee1275/ieee1275.h grubof_CFLAGS = $(COMMON_CFLAGS) grubof_ASFLAGS = $(COMMON_ASFLAGS) -grubof_LDFLAGS = -nostdlib -static-libgcc -lgcc -Wl,-N,-S,-Ttext,0x200000,-Bstatic +grubof_LDFLAGS = -nostdlib -static-libgcc -lgcc -Wl,-N,-S,-Ttext,0x200000,-Bstatic $(LDFLAGS) # For genmoddep. genmoddep_SOURCES = util/genmoddep.c --Apple-Mail-4--736928821--