Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1FW2n6-0006Cm-DK for mharc-grub-devel@gnu.org; Tue, 18 Apr 2006 22:51:40 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FW2n4-0006CX-Ne for grub-devel@gnu.org; Tue, 18 Apr 2006 22:51:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FW2n2-0006C2-Cg for grub-devel@gnu.org; Tue, 18 Apr 2006 22:51:37 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FW2n2-0006By-9Q for grub-devel@gnu.org; Tue, 18 Apr 2006 22:51:36 -0400 Received: from [209.86.89.68] (helo=smtpauth08.mail.atl.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FW2o2-0000bN-Nk for grub-devel@gnu.org; Tue, 18 Apr 2006 22:52:38 -0400 Received: from [63.246.184.80] (helo=[192.168.0.101]) by smtpauth08.mail.atl.earthlink.net with asmtp (Exim 4.34) id 1FW2my-0005iS-2f for grub-devel@gnu.org; Tue, 18 Apr 2006 22:51:32 -0400 Mime-Version: 1.0 (Apple Message framework v623) To: The development of GRUB 2 Message-Id: Content-Type: multipart/mixed; boundary=Apple-Mail-8--395816360 From: Hollis Blanchard Date: Tue, 18 Apr 2006 21:51:48 -0500 X-Mailer: Apple Mail (2.623) X-ELNK-Trace: 77a46389d001b1f223bcf3e39c2f8b5f1aa676d7e74259b7b3291a7d08dfec799bf458eda3e14cf967b5caa6e1152043350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 63.246.184.80 Subject: [ppc patch] fix biarch linking 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: Wed, 19 Apr 2006 02:51:38 -0000 --Apple-Mail-8--395816360 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed 2006-04-18 Hollis Blanchard * Makefile.in (LDFLAGS): Add variable. (LD): Remove variable. * configure.ac: Add -m32 to LDFLAGS. * genmk.rb (PModule#rule): Use $(CC) instead of $(LD). * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable. (grubof_LDFLAGS): Use $(COMMON_LDFLAGS). (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS, suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New variables. Could somebody please confirm that x86 still builds and works with this patch? Thanks. -Hollis --Apple-Mail-8--395816360 Content-Transfer-Encoding: 7bit Content-Type: text/plain; x-unix-mode=0644; name="grub2-link-m32.txt" Content-Disposition: attachment; filename=grub2-link-m32.txt Index: Makefile.in =================================================================== RCS file: /sources/grub/grub2/Makefile.in,v retrieving revision 1.18 diff -u -p -r1.18 Makefile.in --- Makefile.in 18 Apr 2006 06:18:15 -0000 1.18 +++ Makefile.in 19 Apr 2006 02:40:08 -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 @@ -64,7 +65,6 @@ BUILD_CPPFLAGS = -I. -Iinclude -I$(srcdi OBJCOPY = @OBJCOPY@ STRIP = @STRIP@ NM = @NM@ -LD = @LD@ RUBY = @RUBY@ LIBCURSES = @LIBCURSES@ LIBLZO = @LIBLZO@ 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 19 Apr 2006 02:40:09 -0000 @@ -89,6 +89,8 @@ if test "x$default_CFLAGS" = xyes; then if test "x$biarch32" = x1; then tmp_CFLAGS="$tmp_CFLAGS -m32" + LDFLAGS="$LDFLAGS -m32" + AC_SUBST(LDFLAGS) fi CFLAGS="$tmp_CFLAGS" Index: genmk.rb =================================================================== RCS file: /sources/grub/grub2/genmk.rb,v retrieving revision 1.19 diff -u -p -r1.19 genmk.rb --- genmk.rb 18 Apr 2006 06:18:15 -0000 1.19 +++ genmk.rb 19 Apr 2006 02:40:09 -0000 @@ -121,12 +121,12 @@ UNDSYMFILES += #{undsym} #{@name}: #{pre_obj} #{mod_obj} -rm -f $@ - $(LD) $(#{prefix}_LDFLAGS) $(LDFLAGS) -r -d -o $@ $^ + $(CC) $(#{prefix}_LDFLAGS) $(LDFLAGS) -Wl,-r,-d -o $@ $^ $(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@ #{pre_obj}: #{objs_str} -rm -f $@ - $(LD) $(#{prefix}_LDFLAGS) -r -d -o $@ $^ + $(CC) $(#{prefix}_LDFLAGS) $(LDFLAGS) -Wl,-r,-d -o $@ $^ #{mod_obj}: #{mod_src} $(CC) $(CPPFLAGS) $(CFLAGS) $(#{prefix}_CFLAGS) -c -o $@ $< 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 19 Apr 2006 02:40:09 -0000 @@ -3,6 +3,7 @@ COMMON_ASFLAGS = -nostdinc -D__ASSEMBLY__ COMMON_CFLAGS = -ffreestanding -msoft-float +COMMON_LDFLAGS += -nostdlib # Images. @@ -69,7 +70,8 @@ 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 = $(COMMON_LDFLAGS) -static-libgcc -lgcc \ + -Wl,-N,-S,-Ttext,0x200000,-Bstatic # For genmoddep. genmoddep_SOURCES = util/genmoddep.c @@ -91,10 +93,12 @@ pkgdata_MODULES = halt.mod \ # For _linux.mod. _linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c _linux_mod_CFLAGS = $(COMMON_CFLAGS) +_linux_mod_LDFLAGS = $(COMMON_LDFLAGS) # For linux.mod. linux_mod_SOURCES = loader/powerpc/ieee1275/linux_normal.c linux_mod_CFLAGS = $(COMMON_CFLAGS) +linux_mod_LDFLAGS = $(COMMON_LDFLAGS) # For normal.mod. normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ @@ -103,18 +107,22 @@ normal_mod_SOURCES = normal/arg.c normal normal/menu_entry.c normal/misc.c grub_script.tab.c \ normal/script.c normal/powerpc/setjmp.S normal_mod_CFLAGS = $(COMMON_CFLAGS) +normal_mod_LDFLAGS = $(COMMON_LDFLAGS) normal_mod_ASFLAGS = $(COMMON_ASFLAGS) # For suspend.mod suspend_mod_SOURCES = commands/ieee1275/suspend.c suspend_mod_CFLAGS = $(COMMON_CFLAGS) +suspend_mod_LDFLAGS = $(COMMON_LDFLAGS) # For reboot.mod reboot_mod_SOURCES = commands/ieee1275/reboot.c reboot_mod_CFLAGS = $(COMMON_CFLAGS) +reboot_mod_LDFLAGS = $(COMMON_LDFLAGS) # For halt.mod halt_mod_SOURCES = commands/ieee1275/halt.c halt_mod_CFLAGS = $(COMMON_CFLAGS) +halt_mod_LDFLAGS = $(COMMON_LDFLAGS) include $(srcdir)/conf/common.mk --Apple-Mail-8--395816360--