diff --git a/js/src/assembler/wtf/Platform.h b/js/src/assembler/wtf/Platform.h index 49c3388f2031..f929831ab6f0 100644 --- a/js/src/assembler/wtf/Platform.h +++ b/js/src/assembler/wtf/Platform.h @@ -165,16 +165,22 @@ || defined(__POWERPC__) \ || defined(_M_PPC) \ || defined(__PPC) +#if !defined(__ppc64__) && !defined(__PPC64__) #define WTF_CPU_PPC 1 +#endif +#if !defined(__LITTLE_ENDIAN__) #define WTF_CPU_BIG_ENDIAN 1 #endif +#endif /* WTF_CPU_PPC64 - PowerPC 64-bit */ #if defined(__ppc64__) \ || defined(__PPC64__) #define WTF_CPU_PPC64 1 +#if !defined(__LITTLE_ENDIAN__) #define WTF_CPU_BIG_ENDIAN 1 #endif +#endif /* WTF_CPU_SH4 - SuperH SH-4 */ #if defined(__SH4__) diff --git a/js/src/configure.in b/js/src/configure.in index 31a90497c4b6..4d6f933d11fd 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -934,7 +934,7 @@ case "$OS_TEST" in CPU_ARCH=x86 ;; -powerpc64 | ppc64) +powerpc64 | ppc64 | powerpc64le | ppc64le) CPU_ARCH=ppc64 ;; diff --git a/js/src/jscpucfg.h b/js/src/jscpucfg.h index 5008832c91c9..a7a00613bbe6 100644 --- a/js/src/jscpucfg.h +++ b/js/src/jscpucfg.h @@ -27,7 +27,7 @@ # define IS_LITTLE_ENDIAN 1 # undef IS_BIG_ENDIAN -#elif defined(__APPLE__) +#elif defined(__APPLE__) || defined(__powerpc__) || defined(__ppc__) # if __LITTLE_ENDIAN__ # define IS_LITTLE_ENDIAN 1 # undef IS_BIG_ENDIAN @@ -89,8 +89,7 @@ # endif #elif defined(__sparc) || defined(__sparc__) || \ - defined(_POWER) || defined(__powerpc__) || \ - defined(__ppc__) || defined(__hppa) || \ + defined(_POWER) || defined(__hppa) || \ defined(_MIPSEB) || defined(_BIG_ENDIAN) /* IA64 running HP-UX will have _BIG_ENDIAN defined. * IA64 running Linux will have endian.h and be handled above.