All of lore.kernel.org
 help / color / mirror / Atom feed
* [ppc patch] link with -m32
@ 2006-04-15  4:06 Hollis Blanchard
  2006-04-15  5:27 ` Hollis Blanchard
  0 siblings, 1 reply; 8+ messages in thread
From: Hollis Blanchard @ 2006-04-15  4:06 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

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

[-- Attachment #2: grub-biarch-link.txt --]
[-- Type: text/plain, Size: 2211 bytes --]

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-04-15 16:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-15  4:06 [ppc patch] link with -m32 Hollis Blanchard
2006-04-15  5:27 ` Hollis Blanchard
2006-04-15 10:36   ` Marco Gerards
2006-04-15 12:44     ` Vincent Pelletier
2006-04-15 13:37     ` Hollis Blanchard
2006-04-15 13:54     ` Hollis Blanchard
2006-04-15 14:06       ` LDFLAGS Hollis Blanchard
2006-04-15 16:08         ` LDFLAGS Yoshinori K. Okuji

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.