0001-Fix-error-attribute-target-crc-is-unknown.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From f0c02fb22bc277e2015a18e562b551ec7b3eed9e Mon Sep 17 00:00:00 2001
  2. From: Peter Seiderer <ps.report@gmx.net>
  3. Date: Sun, 16 Jul 2017 00:05:44 +0200
  4. Subject: [PATCH] Fix error attribute(target("+crc")) is unknown
  5. Task-number: QTBUG-61975
  6. Change-Id: I0b1b55c0737dad485b5ace8e6eb7cb842589453d
  7. Upstream: https://codereview.qt-project.org/200171
  8. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  9. ---
  10. src/corelib/tools/qhash.cpp | 2 ++
  11. src/corelib/tools/qsimd_p.h | 3 +++
  12. 2 files changed, 5 insertions(+)
  13. diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
  14. index 1f9c05c..bbf6efb 100644
  15. --- a/src/corelib/tools/qhash.cpp
  16. +++ b/src/corelib/tools/qhash.cpp
  17. @@ -144,7 +144,9 @@ static inline bool hasFastCrc32()
  18. }
  19. template <typename Char>
  20. +#if defined(__aarch64__)
  21. QT_FUNCTION_TARGET(CRC32)
  22. +#endif
  23. static uint crc32(const Char *ptr, size_t len, uint h)
  24. {
  25. // The crc32[whbd] instructions on Aarch64/Aarch32 calculate a 32-bit CRC32 checksum
  26. diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
  27. index 023a4b0..a85d572 100644
  28. --- a/src/corelib/tools/qsimd_p.h
  29. +++ b/src/corelib/tools/qsimd_p.h
  30. @@ -326,7 +326,10 @@
  31. #endif
  32. // AArch64/ARM64
  33. #if defined(Q_PROCESSOR_ARM_V8) && defined(__ARM_FEATURE_CRC32)
  34. +#if defined(__aarch64__)
  35. +// only available on aarch64
  36. #define QT_FUNCTION_TARGET_STRING_CRC32 "+crc"
  37. +#endif
  38. # include <arm_acle.h>
  39. #endif
  40. --
  41. 2.7.4