From 2493dca54e18b24bcd8b7ff5432f4dc51dddc472 Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Sat, 28 May 2016 20:33:15 +0800 Subject: Add isa_defs for MIPS GCC for MIPS only defines _LP64 when 64bit, while no _ILP32 defined when 32bit. Signed-off-by: YunQiang Su Signed-off-by: Brian Behlendorf Closes #4712 --- lib/libspl/include/sys/isa_defs.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'lib/libspl') diff --git a/lib/libspl/include/sys/isa_defs.h b/lib/libspl/include/sys/isa_defs.h index 61f4cd96a..3bca5cf02 100644 --- a/lib/libspl/include/sys/isa_defs.h +++ b/lib/libspl/include/sys/isa_defs.h @@ -172,7 +172,28 @@ extern "C" { #define _BIG_ENDIAN #define _SUNOS_VTOC_16 -#else /* Currently x86_64, i386, arm, powerpc, s390, and sparc are supported */ +/* MIPS arch specific defines */ +#elif defined(__mips__) + +#if defined(__MIPSEB__) +#define _BIG_ENDIAN +#elif defined(__MIPSEL__) +#define _LITTLE_ENDIAN +#else +#error MIPS no endian specified +#endif + +#ifndef _LP64 +#define _ILP32 +#endif + +#define _SUNOS_VTOC_16 + +#else +/* + * Currently supported: + * x86_64, i386, arm, powerpc, s390, sparc, and mips + */ #error "Unsupported ISA type" #endif -- cgit v1.2.3