0001-Fix-compilation-error-raised-by-vqtbl1q_u8-instructi.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. From 284d5a6f267d4962b2b88540f218c10740a6c053 Mon Sep 17 00:00:00 2001
  2. From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
  3. Date: Sat, 8 Jun 2024 18:42:16 +0200
  4. Subject: [PATCH] Fix compilation error raised by vqtbl1q_u8 instruction
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. The compilation in Buildroot for the raspberrypi3_qt5we_defconfig
  9. configuration:
  10. make raspberrypi3_qt5we_defconfig
  11. make
  12. raises the following error:
  13. In file included from buildroot/output/build/snappy-1.2.1/snappy.cc:29:
  14. buildroot/output/build/snappy-1.2.1/snappy-internal.h: In function ‘snappy::internal::V128 snappy::internal::V128_Shuffle(V128, V128)’:
  15. buildroot/output/build/snappy-1.2.1/snappy-internal.h:109:10: error: ‘vqtbl1q_u8’ was not declared in this scope; did you mean ‘vtbl1_u8’?
  16. 109 | return vqtbl1q_u8(input, shuffle_mask);
  17. | ^~~~~~~~~~
  18. | vtbl1_u8
  19. make[4]: *** [CMakeFiles/snappy.dir/build.make:118: CMakeFiles/snappy.dir/snappy.cc.o] Error 1
  20. As reported by [1], the vqtbl1q_u8 instruction is supported by A64
  21. architectures. For this reason, the patch enables the use of the
  22. instruction only for NEON of such architecture.
  23. [1] https://developer.arm.com/architectures/instruction-sets/intrinsics/vqtbl1q_u8
  24. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
  25. Upstream: https://github.com/google/snappy/pull/185
  26. ---
  27. snappy-internal.h | 2 +-
  28. 1 file changed, 1 insertion(+), 1 deletion(-)
  29. diff --git a/snappy-internal.h b/snappy-internal.h
  30. index ae78247dbbc9..256d32344d1a 100644
  31. --- a/snappy-internal.h
  32. +++ b/snappy-internal.h
  33. @@ -46,7 +46,7 @@
  34. #include <arm_neon.h>
  35. #endif
  36. -#if SNAPPY_HAVE_SSSE3 || SNAPPY_HAVE_NEON
  37. +#if SNAPPY_HAVE_SSSE3 || (SNAPPY_HAVE_NEON && defined(__aarch64__))
  38. #define SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE 1
  39. #else
  40. #define SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE 0
  41. --
  42. 2.43.0