Blob Blame History Raw
diff --git a/SConstruct b/SConstruct
index b1942ea..6dd836d 100644
--- a/SConstruct
+++ b/SConstruct
@@ -987,6 +987,7 @@ processor_macros = {
     'arm'     : { 'endian': 'little', 'defines': ('__arm__',) },
     'aarch64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')},
     'i386'    : { 'endian': 'little', 'defines': ('__i386', '_M_IX86')},
+    'ppc64'   : { 'endian': 'big',    'defines': ('__powerpc64__) && defined(__BIG_ENDIAN__',)},
     'ppc64le' : { 'endian': 'little', 'defines': ('__powerpc64__',)},
     's390x'   : { 'endian': 'big',    'defines': ('__s390x__',)},
     'sparc'   : { 'endian': 'big',    'defines': ('__sparc',)},
diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h
index 355d70e..afefe7b 100755
--- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h
+++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h
@@ -570,7 +570,7 @@
 #       endif
 
 
-#elif (defined(__s390x__))
+#elif (defined(__s390x__)) || (defined(__powerpc64__) && defined(__BIG_ENDIAN__))
 
 #	undef  vax
 #	undef  mips
diff --git a/src/third_party/IntelRDFPMathLib20U1/SConscript b/src/third_party/IntelRDFPMathLib20U1/SConscript
index 56d3649..284aba9 100644
--- a/src/third_party/IntelRDFPMathLib20U1/SConscript
+++ b/src/third_party/IntelRDFPMathLib20U1/SConscript
@@ -309,6 +309,9 @@ elif processor == 'x86_64' or processor == 'ppc64le':
     cpp_defines['efi2'] = '1'
     cpp_defines['EFI2'] = '1'
 # Using 64 bit big endian
+elif processor == 'ppc64':
+    cpp_defines['ppc64'] = '1'
+    cpp_defines['BID_BIG_ENDIAN'] = '1'
 elif processor == 's390x':
     cpp_defines['s390x'] = '1'
     cpp_defines['BID_BIG_ENDIAN'] = '1'
diff --git a/src/third_party/wiredtiger/SConscript b/src/third_party/wiredtiger/SConscript
index 5d36706..c4f034f 100644
--- a/src/third_party/wiredtiger/SConscript
+++ b/src/third_party/wiredtiger/SConscript
@@ -140,7 +140,7 @@ condition_map = {
     'WINDOWS_HOST' : env.TargetOSIs('windows'),
 
     'ARM64_HOST'   : env['TARGET_ARCH'] == 'aarch64',
-    'POWERPC_HOST' : env['TARGET_ARCH'] == 'ppc64le',
+    'POWERPC_HOST' : env['TARGET_ARCH'] == 'ppc64le' or env['TARGET_ARCH'] == 'ppc64',
     'X86_HOST'     : env['TARGET_ARCH'] == 'x86_64',
     'ZSERIES_HOST' : env['TARGET_ARCH'] == 's390x',
 }
@@ -172,6 +172,10 @@ if useSnappy:
 if not (env['TARGET_ARCH'] == 's390x' and get_option("use-s390x-crc32") == "off"):
     env.Append(CPPDEFINES=["HAVE_CRC32_HARDWARE"])
 
+# It is not possible to pass ASFLAGS through variables to scons now
+if env['TARGET_ARCH'] == 'ppc64':
+    env.Append(ASFLAGS=["-mcpu=power8"])
+
 wtlib = env.Library(
     target="wiredtiger",
     source=wtsources,