Index: Makefile.in =================================================================== RCS file: /cvsroot/grub/grub2/Makefile.in,v retrieving revision 1.8 diff -u -r1.8 Makefile.in --- Makefile.in 27 Dec 2004 13:46:19 -0000 1.8 +++ Makefile.in 22 Jan 2005 14:24:05 -0000 @@ -34,7 +34,7 @@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ -pkgdatadir = $(datadir)/@PACKAGE_TARNAME@/$(host_cpu)-$(host_vendor) +pkgdatadir = $(datadir)/@PACKAGE_TARNAME@/$(target_cpu)-$(host_vendor) pkglibdir = $(libdir)/@PACKAGE_TARNAME@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -43,7 +43,7 @@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -host_cpu = @host_cpu@ +host_cpu = @target_cpu@ host_vendor = @host_vendor@ INSTALL = @INSTALL@ Index: configure.ac =================================================================== RCS file: /cvsroot/grub/grub2/configure.ac,v retrieving revision 1.9 diff -u -r1.9 configure.ac --- configure.ac 4 Apr 2004 13:45:59 -0000 1.9 +++ configure.ac 22 Jan 2005 14:24:14 -0000 @@ -21,18 +21,19 @@ AC_CANONICAL_HOST case "$host_cpu" in - i[[3456]]86) host_cpu=i386 ;; - powerpc) ;; + i[[3456]]86) target_cpu=i386 ;; + x86_64) target_cpu=i386 ;; + powerpc) target_cpu=powerpc;; *) AC_MSG_ERROR([unsupported CPU type]) ;; esac -case "$host_cpu"-"$host_vendor" in +case "$target_cpu"-"$host_vendor" in i386-*) host_vendor=pc ;; powerpc-*) host_vendor=ieee1275 ;; *) AC_MSG_ERROR([unsupported machine type]) ;; esac -AC_SUBST(host_cpu) +AC_SUBST(target_cpu) AC_SUBST(host_vendor) # Checks for programs. @@ -51,6 +52,11 @@ tmp_CFLAGS="-Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes \ -Wundef -Wstrict-prototypes -g" + if test "x$host_cpu" = xx86_64; then + CC="gcc -m32" + LD="ld -melf_i386" + fi + # optimization flags. AC_CACHE_CHECK([whether optimization for size works], size_flag, [ CFLAGS=-Os @@ -63,7 +69,7 @@ fi # Force no alignment to save space on i386. - if test "x$host_cpu" = xi386; then + if test "x$target_cpu" = xi386; then AC_CACHE_CHECK([whether -falign-loops works], [falign_loop_flag], [ CFLAGS="-falign-loops=1" AC_TRY_COMPILE(, , [falign_loop_flag=yes], [falign_loop_flag=no]) @@ -82,13 +88,13 @@ # Defined in aclocal.m4. grub_ASM_USCORE -if test "x$host_cpu" = xi386; then +if test "x$target_cpu" = xi386; then grub_CHECK_START_SYMBOL grub_CHECK_BSS_START_SYMBOL grub_CHECK_END_SYMBOL fi -if test "x$host_cpu" = xi386; then +if test "x$target_cpu" = xi386; then grub_I386_ASM_PREFIX_REQUIREMENT grub_I386_ASM_ADDR32 grub_I386_ASM_ABSOLUTE_WITHOUT_ASTERISK @@ -131,7 +137,7 @@ AC_CHECK_SIZEOF(long) # Check LZO when compiling for the i386. -if test "x$host_cpu" = xi386; then +if test "x$target_cpu" = xi386; then AC_CHECK_LIB(lzo, __lzo_init2, , AC_MSG_ERROR([LZO library version 1.02 or later is required])) AC_CHECK_FUNC(lzo1x_999_compress, , @@ -143,8 +149,8 @@ CPPFLAGS="$tmp_CPPFLAGS" # Output files. -AC_CONFIG_LINKS([include/grub/cpu:include/grub/$host_cpu - include/grub/machine:include/grub/$host_cpu/$host_vendor]) +AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu + include/grub/machine:include/grub/$target_cpu/$host_vendor]) AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h]) AC_OUTPUT