The attached patch lets GRUB build on x86_64 assuming you have a
multilib compatible build environment set up (ie, gcc -m32 gives you
32-bit binaries)

Jeremy

Index: ChangeLog
===================================================================
RCS file: /cvsroot/grub/grub/ChangeLog,v
retrieving revision 1.540
diff -u -u -r1.540 ChangeLog
--- ChangeLog	21 Dec 2002 00:34:33 -0000	1.540
+++ ChangeLog	29 Dec 2002 07:28:39 -0000
@@ -1,3 +1,7 @@
+2002-12-29  Jeremy Katz  <[EMAIL PROTECTED]>
+
+	* configure.in: Support building on x86_64 with gcc -m32.
+
 2002-12-21  Yoshinori K. Okuji  <[EMAIL PROTECTED]>
 
 	* stage2/asm.S (gateA20): First, try a BIOS call (INT 15H,
Index: configure.in
===================================================================
RCS file: /cvsroot/grub/grub/configure.in,v
retrieving revision 1.74
diff -u -u -r1.74 configure.in
--- configure.in	29 Nov 2002 20:39:23 -0000	1.74
+++ configure.in	29 Dec 2002 07:28:40 -0000
@@ -21,6 +21,7 @@
 
 case "$host_cpu" in
 i[[3456]]86) host_cpu=i386 ;;
+x86_64) host_cpu=x86_64 ;;
 *) AC_MSG_ERROR([unsupported CPU type]) ;;
 esac
 
@@ -44,6 +45,12 @@
   default_CFLAGS=yes
 fi
 
+# this should be checked before AC_PROG_CC
+if test "x$host_cpu" = xx86_64; then
+  CFLAGS="-m32 $CFLAGS"
+fi
+  
+
 #
 # Programs
 #
@@ -72,7 +79,7 @@
 # optimization flags
 if test "x$ac_cv_prog_gcc" = xyes; then
   if test "x$default_CFLAGS" = xyes; then
-    CFLAGS="-g"
+    CFLAGS="$CFLAGS -g"
     # If the user specify the directory for binutils, add the option `-B'.
     if test "x$with_binutils" != x; then
       CFLAGS="-B$with_binutils/ $CFLAGS"
_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub

Reply via email to