From 4a1eefb623104fe61c88f17db2d2dbb13d44a038 Mon Sep 17 00:00:00 2001 From: phcoder Date: Sun, 18 Oct 2009 15:06:47 +0200 Subject: [PATCH] Revert "simplify mipsel handling" This reverts commit 3451c43f4938a20aee5a2c0d0fa17c29e40b989b. Conflicts: configure.ac --- configure.ac | 11 ++++++++++- include/grub/mips/types.h | 6 ++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index f13cac52a..abfcf92e7 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,16 @@ AC_ARG_PROGRAM case "$target_cpu" in i[[3456]]86) target_cpu=i386 ;; sparc) target_cpu=sparc64 ;; - mipsel) target_cpu=mips ;; + mipsel) + target_cpu=mips; + TARGET_CFLAGS="$TARGET_CFLAGS -DGRUB_CPU_MIPSEL=1"; + CFLAGS="$CFLAGS -DGRUB_CPU_MIPSEL=1"; + ;; + mips) + target_cpu=mips; + TARGET_CFLAGS="$TARGET_CFLAGS -DGRUB_CPU_MIPS=1"; + CFLAGS="$CFLAGS -DGRUB_CPU_MIPS=1"; + ;; esac # Specify the platform (such as firmware). diff --git a/include/grub/mips/types.h b/include/grub/mips/types.h index aed597451..fe09afa3e 100644 --- a/include/grub/mips/types.h +++ b/include/grub/mips/types.h @@ -25,12 +25,14 @@ /* The size of long. */ #define GRUB_TARGET_SIZEOF_LONG 4 -#ifdef __MIPSEL__ +#ifdef GRUB_CPU_MIPSEL /* mipsEL is little-endian. */ #undef GRUB_TARGET_WORDS_BIGENDIAN -#else +#elif defined (GRUB_CPU_MIPS) /* mips is big-endian. */ #define GRUB_TARGET_WORDS_BIGENDIAN +#elif !defined (GRUB_SYMBOL_GENERATOR) +#error Neither GRUB_CPU_MIPS nor GRUB_CPU_MIPSEL is defined #endif #endif /* ! GRUB_TYPES_CPU_HEADER */