grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86_64 compiling (fixed message)


From: Ruslan Nikolaev
Subject: [PATCH] x86_64 compiling (fixed message)
Date: Mon, 08 Aug 2005 18:04:31 -0500

I'm sorry... Previous message contains patch w/o new lines.

PATCH:

diff -urN old/configure.ac new/configure.ac

--- old/configure.ac 2005-08-08 19:08:41.000000000 +0000

+++ new/configure.ac 2005-08-09 01:25:14.135290880 +0000

@@ -22,16 +22,27 @@

case "$host_cpu" in

i[[3456]]86) host_cpu=i386 ;;

+ x86_64) ;;

powerpc) ;;

*) AC_MSG_ERROR([unsupported CPU type]) ;;

esac

case "$host_cpu"-"$host_vendor" in

i386-*) host_vendor=pc ;;

+ x86_64-*) host_vendor=pc ;;

powerpc-*) host_vendor=ieee1275 ;;

*) AC_MSG_ERROR([unsupported machine type]) ;;

esac

+# Keep CC for BUILD_CC

+CC_ARCH="$CC"

+

+# Override x86_64 settings

+if test "x$host_cpu" = xx86_64; then

+ CC="$CC -m32"

+ LD="ld -melf_i386"

+fi

+

AC_SUBST(host_cpu)

AC_SUBST(host_vendor)

@@ -62,8 +73,8 @@

tmp_CFLAGS="$tmp_CFLAGS -O2 -fno-strength-reduce -fno-unroll-loops"

fi

- # Force no alignment to save space on i386.

- if test "x$host_cpu" = xi386; then

+ # Force no alignment to save space on i386/x86_64.

+ if test "x$host_cpu" = xi386 -o "x$host_cpu" = xx86_64; 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 +93,13 @@

# Defined in aclocal.m4.

grub_ASM_USCORE

-if test "x$host_cpu" = xi386; then

+if test "x$host_cpu" = xi386 -o "x$host_cpu" = xx86_64; 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$host_cpu" = xi386 -o "x$host_cpu" = xx86_64; then

grub_I386_ASM_PREFIX_REQUIREMENT

grub_I386_ASM_ADDR32

grub_I386_ASM_ABSOLUTE_WITHOUT_ASTERISK

@@ -113,7 +124,7 @@

AC_CHECK_PROGS(BUILD_CC, [gcc egcs cc],

[AC_MSG_ERROR([none of gcc, egcs and cc is found. set BUILD_CC manually.])])

else

- BUILD_CC="$CC"

+ BUILD_CC="$CC_ARCH"

AC_SUBST(BUILD_CC)

fi

@@ -130,8 +141,8 @@

AC_CHECK_SIZEOF(void *)

AC_CHECK_SIZEOF(long)

-# Check LZO when compiling for the i386.

-if test "x$host_cpu" = xi386; then

+# Check LZO when compiling for the i386/x86_64.

+if test "x$host_cpu" = xi386 -o "x$host_cpu" = xx86_64; 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, ,

@@ -150,6 +161,13 @@

CFLAGS="$tmp_CFLAGS"

CPPFLAGS="$tmp_CPPFLAGS"

+# Create links for x86_64

+if test "x$host_cpu" = xx86_64; then

+ AC_CONFIG_LINKS([include/grub/x86_64:include/grub/i386])

+ AC_CONFIG_LINKS([conf/x86_64-$host_vendor.mk:conf/i386-$host_vendor.mk

+ conf/x86_64-$host_vendor.rmk:conf/i386-$host_vendor.rmk])

+fi

+

# Output files.

AC_CONFIG_LINKS([include/grub/cpu:include/grub/$host_cpu

include/grub/machine:include/grub/$host_cpu/$host_vendor])


--

___________________________________________________________
Sign-up for Ads Free at Mail.com
http://www.mail.com/?sr=signup


reply via email to

[Prev in Thread] Current Thread [Next in Thread]