You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
3.7 KiB

diff --git a/SConstruct b/SConstruct
index 52095d8b70..29ffc3ada4 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1059,6 +1059,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',)},
@@ -3358,7 +3359,7 @@ def doConfigure(myenv):
# ask each module to configure itself and the build environment.
moduleconfig.configure_modules(mongo_modules, conf)
- if env['TARGET_ARCH'] == "ppc64le":
+ if env['TARGET_ARCH'] == "ppc64le" or env['TARGET_ARCH'] == "ppc64":
# This checks for an altivec optimization we use in full text search.
# Different versions of gcc appear to put output bytes in different
# parts of the output vector produced by vec_vbpermq. This configure
diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h
index 355d70e813..afefe7b1f0 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 c8eb827c28..60d7506adc 100644
--- a/src/third_party/IntelRDFPMathLib20U1/SConscript
+++ b/src/third_party/IntelRDFPMathLib20U1/SConscript
@@ -316,6 +316,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/timelib-2018.01alpha1/parse_tz.c b/src/third_party/timelib-2018.01alpha1/parse_tz.c
index 5986cd6468..18d41254ce 100644
--- a/src/third_party/timelib-2018.01alpha1/parse_tz.c
+++ b/src/third_party/timelib-2018.01alpha1/parse_tz.c
@@ -38,7 +38,7 @@
# endif
#endif
-#if defined(__s390__)
+#if defined(__s390__) || defined(__powerpc64__)
# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
# define WORDS_BIGENDIAN
# else
diff --git a/src/third_party/wiredtiger/SConscript b/src/third_party/wiredtiger/SConscript
index 40b80a09b6..fac3466aed 100644
--- a/src/third_party/wiredtiger/SConscript
+++ b/src/third_party/wiredtiger/SConscript
@@ -152,7 +152,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',
}
@@ -182,6 +182,10 @@ if useSnappy:
if (get_option("use-s390x-crc32") == "off"):
env.Append(CPPDEFINES=["HAVE_NO_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,