diff --git build/build-clang/build-clang.py build/build-clang/build-clang.py
index 697bbb9b..26b3118e 100755
--- build/build-clang/build-clang.py
+++ build/build-clang/build-clang.py
@@ -368,9 +368,7 @@ if __name__ == "__main__":
 
     if is_darwin():
         extra_cflags = []
-        extra_cxxflags = ["-stdlib=libc++"]
         extra_cflags2 = []
-        extra_cxxflags2 = ["-stdlib=libc++"]
     elif is_linux():
         extra_cflags = ["-static-libgcc"]
         extra_cxxflags = ["-static-libgcc", "-static-libstdc++"]
diff --git build/clang-plugin/moz.build build/clang-plugin/moz.build
index d9b20cd9..724089ae 100644
--- build/clang-plugin/moz.build
+++ build/clang-plugin/moz.build
@@ -13,11 +13,6 @@ SOURCES += [
 DISABLE_STL_WRAPPING = True
 NO_VISIBILITY_FLAGS = True
 
-# libc++ is required to build plugins against clang on OS X.
-if CONFIG['HOST_OS_ARCH'] == 'Darwin':
-    CXXFLAGS += ['-stdlib=libc++']
-    LDFLAGS += ['-lc++']
-
 DIRS += [
     'tests',
 ]
diff --git js/src/ctypes/CTypes.cpp js/src/ctypes/CTypes.cpp
index 0facd000..e3011ae3 100644
--- js/src/ctypes/CTypes.cpp
+++ js/src/ctypes/CTypes.cpp
@@ -2538,7 +2538,7 @@ struct ConvertImpl<uint64_t, double> {
 // round-trip. In fact, on some platforms, including SPARC, there are pairs of
 // values, a uint64_t and a double, such that neither value is exactly
 // representable in the other type, but they cast to each other.
-#if defined(SPARC) || defined(__powerpc__)
+#if defined(SPARC) || defined(__powerpc__) || defined(__POWERPC__)
 // Simulate x86 overflow behavior
 template<>
 struct ConvertImpl<uint64_t, double> {
diff --git js/src/ds/MemoryProtectionExceptionHandler.cpp js/src/ds/MemoryProtectionExceptionHandler.cpp
index 7c6646a9..93636f0d 100644
--- js/src/ds/MemoryProtectionExceptionHandler.cpp
+++ js/src/ds/MemoryProtectionExceptionHandler.cpp
@@ -30,6 +30,15 @@
 #include "threading/Thread.h"
 #include "vm/MutexIDs.h"
 
+
+/* These aren't defined in the 10.4 SDK, so provide them here */
+#ifndef EXC_MASK_CRASH
+#define EXC_MASK_CRASH 0x400
+#endif
+#ifndef MACH_EXCEPTION_CODES
+#define MACH_EXCEPTION_CODES 0x80000000
+#endif
+
 namespace js {
 
 /*
diff --git js/src/jsgc.cpp js/src/jsgc.cpp
index 42d10283..1fd4ccd9 100644
--- js/src/jsgc.cpp
+++ js/src/jsgc.cpp
@@ -3253,8 +3253,9 @@ js::GetCPUCount()
         GetSystemInfo(&sysinfo);
         ncpus = unsigned(sysinfo.dwNumberOfProcessors);
 # else
-        long n = sysconf(_SC_NPROCESSORS_ONLN);
-        ncpus = (n > 0) ? unsigned(n) : 1;
+//        long n = sysconf(_SC_NPROCESSORS_ONLN);
+//        ncpus = (n > 0) ? unsigned(n) : 1;
+          ncpus = 1;
 # endif
     }
     return ncpus;
diff --git js/src/old-configure js/src/old-configure
index de0f8779..961602c7 100644
--- js/src/old-configure
+++ js/src/old-configure
@@ -4968,7 +4968,7 @@ case "$target" in
     MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
     MOZ_OPTIMIZE_FLAGS="-O3 -fno-stack-protector"
     CFLAGS="$CFLAGS -fno-common"
-    CXXFLAGS="$CXXFLAGS -fno-common -stdlib=libc++"
+    CXXFLAGS="$CXXFLAGS -fno-common"
     DLL_SUFFIX=".dylib"
     DSO_LDOPTS=''
     STRIP="$STRIP -x -S"
diff --git js/src/old-configure.in js/src/old-configure.in
index ff0617e3..ba19a6ef 100644
--- js/src/old-configure.in
+++ js/src/old-configure.in
@@ -604,7 +604,7 @@ case "$target" in
     MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
     MOZ_OPTIMIZE_FLAGS="-O3 -fno-stack-protector"
     CFLAGS="$CFLAGS -fno-common"
-    CXXFLAGS="$CXXFLAGS -fno-common -stdlib=libc++"
+    CXXFLAGS="$CXXFLAGS -fno-common"
     DLL_SUFFIX=".dylib"
     DSO_LDOPTS=''
     STRIP="$STRIP -x -S"
diff --git js/src/threading/posix/Thread.cpp js/src/threading/posix/Thread.cpp
index 2572cc72..b9f57e7a 100644
--- js/src/threading/posix/Thread.cpp
+++ js/src/threading/posix/Thread.cpp
@@ -140,6 +140,7 @@ void
 js::ThisThread::SetName(const char* name)
 {
   MOZ_RELEASE_ASSERT(name);
+#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060
 
 #if (defined(__APPLE__) && defined(__MACH__)) || defined(__linux__)
   // On linux and OS X the name may not be longer than 16 bytes, including
@@ -162,13 +163,16 @@ js::ThisThread::SetName(const char* name)
 #else
   rv = pthread_setname_np(pthread_self(), name);
 #endif
+
   MOZ_RELEASE_ASSERT(!rv);
+#endif /* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060 */
 }
 
 void
 js::ThisThread::GetName(char* nameBuffer, size_t len)
 {
   MOZ_RELEASE_ASSERT(len >= 16);
+#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060
 
   int rv = -1;
 #ifdef HAVE_PTHREAD_GETNAME_NP
@@ -177,6 +181,8 @@ js::ThisThread::GetName(char* nameBuffer, size_t len)
   rv = prctl(PR_GET_NAME, reinterpret_cast<unsigned long>(nameBuffer));
 #endif
 
+
   if (rv)
     nameBuffer[0] = '\0';
+#endif /* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1060 */
 }
diff --git js/src/vm/TraceLogging.cpp js/src/vm/TraceLogging.cpp
index 3d6183b3..cb7d1e66 100644
--- js/src/vm/TraceLogging.cpp
+++ js/src/vm/TraceLogging.cpp
@@ -38,7 +38,7 @@ uint64_t inline rdtsc() {
     return ReadTimestampCounter();
 }
 
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__POWERPC__)
 static __inline__ uint64_t
 rdtsc(void)
 {
diff --git js/src/wasm/WasmSignalHandlers.cpp js/src/wasm/WasmSignalHandlers.cpp
index 78d21369..31cfdc5c 100644
--- js/src/wasm/WasmSignalHandlers.cpp
+++ js/src/wasm/WasmSignalHandlers.cpp
@@ -41,6 +41,15 @@ extern "C" MFBT_API bool IsSignalHandlingBroken();
 # endif
 #endif
 
+/* These aren't defined in the 10.4 SDK, so provide them here */
+#ifndef EXC_MASK_CRASH
+#define EXC_MASK_CRASH 0x400
+#endif
+#ifndef MACH_EXCEPTION_CODES
+#define MACH_EXCEPTION_CODES 0x80000000
+#endif
+
+
 // For platforms where the signal/exception handler runs on the same
 // thread/stack as the victim (Unix and Windows), we can use TLS to find any
 // currently executing wasm code.
diff --git memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in
index fdc8fef9..b880b830 100644
--- memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in
+++ memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in
@@ -260,7 +260,7 @@ typedef unsigned szind_t;
 #  ifdef __or1k__
 #    define LG_QUANTUM		3
 #  endif
-#  ifdef __powerpc__
+#  ifdef __powerpc__ || defined(__POWERPC__)
 #    define LG_QUANTUM		4
 #  endif
 #  ifdef __riscv__
diff --git memory/jemalloc/src/include/jemalloc/internal/mb.h memory/jemalloc/src/include/jemalloc/internal/mb.h
index 5384728f..c1081ae5 100644
--- memory/jemalloc/src/include/jemalloc/internal/mb.h
+++ memory/jemalloc/src/include/jemalloc/internal/mb.h
@@ -65,7 +65,7 @@ mb_write(void)
 	    : "memory" /* Clobbers. */
 	    );
 }
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__POWERPC__)
 JEMALLOC_INLINE void
 mb_write(void)
 {
diff --git memory/mozjemalloc/jemalloc.c memory/mozjemalloc/jemalloc.c
index 5d4d83a2..03183e50 100644
--- memory/mozjemalloc/jemalloc.c
+++ memory/mozjemalloc/jemalloc.c
@@ -511,7 +511,7 @@ static const bool isthreaded = true;
 #  define SIZEOF_PTR_2POW	2
 #  define NO_TLS
 #endif
-#ifdef __powerpc__
+#ifdef __powerpc__ || defined(__POWERPC__)
 #  define QUANTUM_2POW_MIN	4
 #  define SIZEOF_PTR_2POW	2
 #endif
@@ -1110,7 +1110,7 @@ static const bool config_recycle = false;
 #if (defined(SOLARIS) || defined(__FreeBSD__)) && \
     (defined(__sparc) || defined(__sparcv9) || defined(__ia64))
 #define pagesize_2pow			((size_t) 13)
-#elif defined(__powerpc64__)
+#elif defined(__powerpc64__) || defined(__POWERPC64__)
 #define pagesize_2pow			((size_t) 16)
 #else
 #define pagesize_2pow			((size_t) 12)
diff --git mfbt/EndianUtils.h mfbt/EndianUtils.h
index 00815580..a885a402 100644
--- mfbt/EndianUtils.h
+++ mfbt/EndianUtils.h
@@ -94,7 +94,7 @@
 #  else
 #    error "CPU type is unknown"
 #  endif
-#elif defined(__APPLE__) || defined(__powerpc__) || defined(__ppc__)
+#elif defined(__APPLE__) || defined(__powerpc__) || defined(__POWERPC__) || defined(__ppc__)
 #  if __LITTLE_ENDIAN__
 #    define MOZ_LITTLE_ENDIAN 1
 #  elif __BIG_ENDIAN__
diff --git mfbt/double-conversion/utils.h mfbt/double-conversion/utils.h
index 15dd4bfb..82add5ec 100644
--- mfbt/double-conversion/utils.h
+++ mfbt/double-conversion/utils.h
@@ -56,7 +56,7 @@
     defined(__ARMEL__) || defined(__avr32__) || \
     defined(__hppa__) || defined(__ia64__) || \
     defined(__mips__) || \
-    defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
+    defined(__powerpc__) || defined(__POWERPC__) || defined(__ppc__) || defined(__ppc64__) || \
     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
     defined(__SH4__) || defined(__alpha__) || \
     defined(_MIPS_ARCH_MIPS32R2) || \
diff --git mfbt/lz4.c mfbt/lz4.c
index c416fe81..440518f8 100644
--- mfbt/lz4.c
+++ mfbt/lz4.c
@@ -47,7 +47,7 @@
 **************************************/
 /* 32 or 64 bits ? */
 #if (defined(__x86_64__) || defined(_M_X64) || defined(_WIN64) \
-  || defined(__powerpc64__) || defined(__powerpc64le__) \
+  || defined(__powerpc64__) || defined(__powerpc64le__) || defined(__POWERPC64__) \
   || defined(__ppc64__) || defined(__ppc64le__) \
   || defined(__PPC64__) || defined(__PPC64LE__) \
   || defined(__ia64) || defined(__itanium__) || defined(_M_IA64) \
@@ -70,7 +70,7 @@
 #elif (defined(__BIG_ENDIAN__) || defined(__BIG_ENDIAN) || defined(_BIG_ENDIAN)) && !(defined(__LITTLE_ENDIAN__) || defined(__LITTLE_ENDIAN) || defined(_LITTLE_ENDIAN))
 #  define LZ4_BIG_ENDIAN 1
 #elif defined(__sparc) || defined(__sparc__) \
-   || defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \
+   || defined(__powerpc__) || defined(__POWERPC__) || defined(__ppc__) || defined(__PPC__) \
    || defined(__hpux)  || defined(__hppa) \
    || defined(_MIPSEB) || defined(__s390__)
 #  define LZ4_BIG_ENDIAN 1
diff --git nsprpub/pr/include/md/_beos.cfg nsprpub/pr/include/md/_beos.cfg
index 5a3c5699..d7f19a6e 100644
--- nsprpub/pr/include/md/_beos.cfg
+++ nsprpub/pr/include/md/_beos.cfg
@@ -17,7 +17,7 @@
 
 #define PR_AF_INET6 5  /* same as AF_INET6 */
 
-#ifdef __powerpc__
+#ifdef __powerpc__ || defined(__POWERPC__)
 #undef  IS_LITTLE_ENDIAN
 #define IS_BIG_ENDIAN 1
 #else
diff --git nsprpub/pr/include/md/_beos.h nsprpub/pr/include/md/_beos.h
index 78469dde..4028aa62 100644
--- nsprpub/pr/include/md/_beos.h
+++ nsprpub/pr/include/md/_beos.h
@@ -29,7 +29,7 @@
 
 #define PR_LINKER_ARCH	"beos"
 #define _PR_SI_SYSNAME  "BEOS"
-#ifdef __powerpc__
+#ifdef __powerpc__ || defined(__POWERPC__)
 #define _PR_SI_ARCHITECTURE "ppc"
 #else
 #define _PR_SI_ARCHITECTURE "x86"
diff --git nsprpub/pr/include/md/_freebsd.cfg nsprpub/pr/include/md/_freebsd.cfg
index 1d1039a5..1e410554 100644
--- nsprpub/pr/include/md/_freebsd.cfg
+++ nsprpub/pr/include/md/_freebsd.cfg
@@ -251,7 +251,7 @@
 #define PR_ALIGN_OF_POINTER 8
 #define PR_ALIGN_OF_WORD    8
 
-#elif defined(__powerpc64__)
+#elif defined(__powerpc64__) || defined(__POWERPC64__)
 
 #undef  IS_LITTLE_ENDIAN
 #define IS_BIG_ENDIAN    1
@@ -297,7 +297,7 @@
 #define PR_BYTES_PER_WORD_LOG2   3
 #define PR_BYTES_PER_DWORD_LOG2  3
 
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__POWERPC__)
 
 #undef  IS_LITTLE_ENDIAN
 #define IS_BIG_ENDIAN    1
diff --git nsprpub/pr/include/md/_freebsd.h nsprpub/pr/include/md/_freebsd.h
index 9a179bcb..56177fe1 100644
--- nsprpub/pr/include/md/_freebsd.h
+++ nsprpub/pr/include/md/_freebsd.h
@@ -25,9 +25,9 @@
 #define _PR_SI_ARCHITECTURE "ia64"
 #elif defined(__amd64__)
 #define _PR_SI_ARCHITECTURE "amd64"
-#elif defined(__powerpc64__)
+#elif defined(__powerpc64__) || defined(__POWERPC64__)
 #define _PR_SI_ARCHITECTURE "powerpc64"
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__POWERPC__)
 #define _PR_SI_ARCHITECTURE "powerpc"
 #elif defined(__aarch64__)
 #define _PR_SI_ARCHITECTURE "aarch64"
diff --git nsprpub/pr/include/md/_linux.cfg nsprpub/pr/include/md/_linux.cfg
index 8cbf0cb9..665f1a95 100644
--- nsprpub/pr/include/md/_linux.cfg
+++ nsprpub/pr/include/md/_linux.cfg
@@ -27,7 +27,7 @@
 #define PR_AF_INET6 10  /* same as AF_INET6 */
 #endif
 
-#ifdef __powerpc64__
+#ifdef __powerpc64__ || defined(__POWERPC64__)
 
 #ifdef __LITTLE_ENDIAN__
 #define IS_LITTLE_ENDIAN 1
@@ -78,7 +78,7 @@
 #define PR_BYTES_PER_WORD_LOG2   3
 #define PR_BYTES_PER_DWORD_LOG2  3
 
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__POWERPC__)
 
 #ifdef __LITTLE_ENDIAN__
 #define IS_LITTLE_ENDIAN 1
diff --git nsprpub/pr/include/md/_linux.h nsprpub/pr/include/md/_linux.h
index b4b298b7..5298075b 100644
--- nsprpub/pr/include/md/_linux.h
+++ nsprpub/pr/include/md/_linux.h
@@ -19,9 +19,9 @@
 
 #define PR_LINKER_ARCH	"linux"
 #define _PR_SI_SYSNAME  "LINUX"
-#ifdef __powerpc64__
+#ifdef __powerpc64__ || defined(__POWERPC64__)
 #define _PR_SI_ARCHITECTURE "ppc64"
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__POWERPC__)
 #define _PR_SI_ARCHITECTURE "ppc"
 #elif defined(__alpha)
 #define _PR_SI_ARCHITECTURE "alpha"
@@ -137,7 +137,7 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
 #endif
 #endif
 
-#if defined(__powerpc__) && !defined(__powerpc64__)
+#if defined(__powerpc__) || defined(__POWERPC__) && !defined(__powerpc64__)
 #define _PR_HAVE_ATOMIC_OPS
 #define _MD_INIT_ATOMIC()
 extern PRInt32 _PR_ppc_AtomicIncrement(PRInt32 *val);
@@ -150,7 +150,7 @@ extern PRInt32 _PR_ppc_AtomicSet(PRInt32 *val, PRInt32 newval);
 #define _MD_ATOMIC_SET                _PR_ppc_AtomicSet
 #endif
 
-#if defined(__powerpc64__)
+#if defined(__powerpc64__) || defined(__POWERPC64__)
 #if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)
 /* Use GCC built-in functions */
 #define _PR_HAVE_ATOMIC_OPS
@@ -329,7 +329,7 @@ extern void _MD_CleanupBeforeExit(void);
 
 #define CONTEXT(_th) ((_th)->md.context)
 
-#ifdef __powerpc__
+#ifdef __powerpc__ || defined(__POWERPC__)
 /*
  * PowerPC based MkLinux
  *
@@ -505,7 +505,7 @@ extern void _MD_CleanupBeforeExit(void);
 /*
 ** Initialize a thread context to run "_main()" when started
 */
-#ifdef __powerpc__
+#ifdef __powerpc__ || defined(__POWERPC__)
 
 #define _MD_INIT_CONTEXT(_thread, _sp, _main, status)  \
 {  \
diff --git nsprpub/pr/include/md/_netbsd.cfg nsprpub/pr/include/md/_netbsd.cfg
index 1326556e..a91213ed 100644
--- nsprpub/pr/include/md/_netbsd.cfg
+++ nsprpub/pr/include/md/_netbsd.cfg
@@ -250,7 +250,7 @@
 #define PR_BYTES_PER_WORD_LOG2  3
 #define PR_BYTES_PER_DWORD_LOG2 3
 
-#elif defined(__powerpc__) || defined(__m68k__)
+#elif defined(__powerpc__) || defined(__POWERPC__) || defined(__m68k__)
 
 #undef  IS_LITTLE_ENDIAN
 #define IS_BIG_ENDIAN    1
diff --git nsprpub/pr/include/md/_netbsd.h nsprpub/pr/include/md/_netbsd.h
index 945d94ff..16d383cf 100644
--- nsprpub/pr/include/md/_netbsd.h
+++ nsprpub/pr/include/md/_netbsd.h
@@ -19,7 +19,7 @@
 #define _PR_SI_ARCHITECTURE "amd64"
 #elif defined(__m68k__)
 #define _PR_SI_ARCHITECTURE "m68k"
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__POWERPC__)
 #define _PR_SI_ARCHITECTURE "powerpc"
 #elif defined(__sparc_v9__)
 #define _PR_SI_ARCHITECTURE "sparc64"
@@ -71,7 +71,7 @@
 
 #define CONTEXT(_th) ((_th)->md.context)
 
-#if defined(__i386__) || defined(__sparc__) || defined(__m68k__) || defined(__powerpc__)
+#if defined(__i386__) || defined(__sparc__) || defined(__m68k__) || defined(__powerpc__) || defined(__POWERPC__)
 #define JB_SP_INDEX 2
 #elif defined(__mips__)
 #define JB_SP_INDEX 4
diff --git nsprpub/pr/include/md/_openbsd.cfg nsprpub/pr/include/md/_openbsd.cfg
index b68d6e9c..02f725ed 100644
--- nsprpub/pr/include/md/_openbsd.cfg
+++ nsprpub/pr/include/md/_openbsd.cfg
@@ -252,7 +252,7 @@
 #define PR_BYTES_PER_WORD_LOG2  3
 #define PR_BYTES_PER_DWORD_LOG2 3
 
-#elif defined(__powerpc__) || defined(__m68k__)
+#elif defined(__powerpc__) || defined(__POWERPC__) || defined(__m68k__)
 
 #undef  IS_LITTLE_ENDIAN
 #define IS_BIG_ENDIAN    1
diff --git nsprpub/pr/include/md/_openbsd.h nsprpub/pr/include/md/_openbsd.h
index 666c177e..3517f812 100644
--- nsprpub/pr/include/md/_openbsd.h
+++ nsprpub/pr/include/md/_openbsd.h
@@ -18,7 +18,7 @@
 #define _PR_SI_ARCHITECTURE "amd64"
 #elif defined(__m68k__)
 #define _PR_SI_ARCHITECTURE "m68k"
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__POWERPC__)
 #define _PR_SI_ARCHITECTURE "powerpc"
 #elif defined(__sparc__)
 #define _PR_SI_ARCHITECTURE "sparc"
@@ -61,7 +61,7 @@
 
 #if defined(__i386__) || defined(__sparc__) || defined(__m68k__)
 #define JB_SP_INDEX 2
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__POWERPC__)
 #define JB_SP_INDEX 1
 #elif defined(__alpha__)
 #define JB_SP_INDEX 34
diff --git nsprpub/pr/include/pratom.h nsprpub/pr/include/pratom.h
index dff9d6c0..6a10734b 100644
--- nsprpub/pr/include/pratom.h
+++ nsprpub/pr/include/pratom.h
@@ -99,12 +99,12 @@ NSPR_API(PRInt32)	PR_AtomicAdd(PRInt32 *ptr, PRInt32 val);
 
 #elif ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) && \
       ((defined(__APPLE__) && \
-           (defined(__ppc__) || defined(__i386__) || defined(__x86_64__))) || \
+           (defined(__ppc__) || defined(__POWERPC__) || defined(__POWERPC64__) || defined(__i386__) || defined(__x86_64__))) || \
        (defined(__linux__) && \
            ((defined(__i386__) && \
            defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)) || \
            defined(__ia64__) || defined(__x86_64__) || \
-           defined(__powerpc__) || \
+           defined(__powerpc__) || defined(__POWERPC__) || \
            (defined(__arm__) && \
            defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)) || \
            defined(__aarch64__) || defined(__alpha) || \
diff --git python/mozbuild/mozbuild/configure/constants.py python/mozbuild/mozbuild/configure/constants.py
index dfc7cf8a..02f0f3bf 100644
--- python/mozbuild/mozbuild/configure/constants.py
+++ python/mozbuild/mozbuild/configure/constants.py
@@ -77,8 +77,8 @@ CPU_preprocessor_checks = OrderedDict((
     ('ia64', '__ia64__'),
     ('s390x', '__s390x__'),
     ('s390', '__s390__'),
-    ('ppc64', '__powerpc64__'),
-    ('ppc', '__powerpc__'),
+    ('ppc64', '__powerpc64__ || __POWERPC64__'),
+    ('ppc', '__powerpc__ || __POWERPC__'),
     ('Alpha', '__alpha__'),
     ('hppa', '__hppa__'),
     ('sparc64', '__sparc__ && __arch64__'),
