diff options
Diffstat (limited to 'meta-oe/recipes-support/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch')
-rw-r--r-- | meta-oe/recipes-support/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch b/meta-oe/recipes-support/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch new file mode 100644 index 000000000..5c5c20ce3 --- /dev/null +++ b/meta-oe/recipes-support/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | imported from debian | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | Index: git/src/third_party/wiredtiger/SConscript | ||
5 | =================================================================== | ||
6 | --- git.orig/src/third_party/wiredtiger/SConscript | ||
7 | +++ git/src/third_party/wiredtiger/SConscript | ||
8 | @@ -169,7 +169,9 @@ if useSnappy: | ||
9 | # If not available at runtime, we fall back to software in some cases. | ||
10 | # | ||
11 | # On zSeries we may disable because SLES 11 kernel doe not support the instructions. | ||
12 | -if not (env['TARGET_ARCH'] == 's390x' and get_option("use-s390x-crc32") == "off"): | ||
13 | +# Debian: disable hardware-assisted crc32 on s390x and arm64, as at least the | ||
14 | +# buildd's do not support the instructions. | ||
15 | +if env['TARGET_ARCH'] not in ('s390x', 'arm64', 'aarch64'): | ||
16 | env.Append(CPPDEFINES=["HAVE_CRC32_HARDWARE"]) | ||
17 | |||
18 | wtlib = env.Library( | ||
19 | Index: git/src/third_party/wiredtiger/dist/filelist | ||
20 | =================================================================== | ||
21 | --- git.orig/src/third_party/wiredtiger/dist/filelist | ||
22 | +++ git/src/third_party/wiredtiger/dist/filelist | ||
23 | @@ -54,7 +54,6 @@ src/checksum/power8/crc32_wrapper.c POWE | ||
24 | src/checksum/software/checksum.c | ||
25 | src/checksum/x86/crc32-x86.c X86_HOST | ||
26 | src/checksum/zseries/crc32-s390x.c ZSERIES_HOST | ||
27 | -src/checksum/zseries/crc32le-vx.sx ZSERIES_HOST | ||
28 | src/config/config.c | ||
29 | src/config/config_api.c | ||
30 | src/config/config_check.c | ||
31 | Index: git/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c | ||
32 | =================================================================== | ||
33 | --- git.orig/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c | ||
34 | +++ git/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c | ||
35 | @@ -78,6 +78,7 @@ unsigned int __wt_crc32c_le(unsigned int | ||
36 | return crc; \ | ||
37 | } | ||
38 | |||
39 | +#if defined(HAVE_CRC32_HARDWARE) | ||
40 | /* Main CRC-32 functions */ | ||
41 | DEFINE_CRC32_VX(__wt_crc32c_le_vx, __wt_crc32c_le_vgfm_16, __wt_crc32c_le) | ||
42 | |||
43 | @@ -90,6 +91,7 @@ __wt_checksum_hw(const void *chunk, size | ||
44 | { | ||
45 | return (~__wt_crc32c_le_vx(0xffffffff, chunk, len)); | ||
46 | } | ||
47 | +#endif | ||
48 | |||
49 | #endif | ||
50 | |||