disable-hw-crc32-on-arm64-s390x.patch 2.0 KB

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