From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: buildroot@buildroot.org
Cc: Dario Binacchi <dario.binacchi@amarulasolutions.com>,
linux-amarula@amarulasolutions.com,
"Yann E . MORIN" <yann.morin.1998@free.fr>
Subject: [Buildroot] [PATCH 2/2] package/snappy: fix compilation error raised by vqtbl1q_u8 instruction
Date: Tue, 11 Jun 2024 19:17:14 +0200 [thread overview]
Message-ID: <20240611171714.3233115-2-dario.binacchi@amarulasolutions.com> (raw)
In-Reply-To: <20240611171714.3233115-1-dario.binacchi@amarulasolutions.com>
The package compilation for the raspberrypi3_qt5we_defconfig raises the
following error:
In file included from buildroot/output/build/snappy-1.2.1/snappy.cc:29:
buildroot/output/build/snappy-1.2.1/snappy-internal.h: In function ‘snappy::internal::V128 snappy::internal::V128_Shuffle(V128, V128)’:
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’?
109 | return vqtbl1q_u8(input, shuffle_mask);
| ^~~~~~~~~~
| vtbl1_u8
make[4]: *** [CMakeFiles/snappy.dir/build.make:118: CMakeFiles/snappy.dir/snappy.cc.o] Error 1
The added patch fixes the error.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
...error-raised-by-vqtbl1q_u8-instructi.patch | 52 +++++++++++++++++++
1 file changed, 52 insertions(+)
create mode 100644 package/snappy/0001-Fix-compilation-error-raised-by-vqtbl1q_u8-instructi.patch
diff --git a/package/snappy/0001-Fix-compilation-error-raised-by-vqtbl1q_u8-instructi.patch b/package/snappy/0001-Fix-compilation-error-raised-by-vqtbl1q_u8-instructi.patch
new file mode 100644
index 000000000000..b10ea7ecdfbe
--- /dev/null
+++ b/package/snappy/0001-Fix-compilation-error-raised-by-vqtbl1q_u8-instructi.patch
@@ -0,0 +1,52 @@
+From 284d5a6f267d4962b2b88540f218c10740a6c053 Mon Sep 17 00:00:00 2001
+From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Date: Sat, 8 Jun 2024 18:42:16 +0200
+Subject: [PATCH] Fix compilation error raised by vqtbl1q_u8 instruction
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The compilation in Buildroot for the raspberrypi3_qt5we_defconfig
+configuration:
+
+make raspberrypi3_qt5we_defconfig
+make
+
+raises the following error:
+
+In file included from buildroot/output/build/snappy-1.2.1/snappy.cc:29:
+buildroot/output/build/snappy-1.2.1/snappy-internal.h: In function ‘snappy::internal::V128 snappy::internal::V128_Shuffle(V128, V128)’:
+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’?
+ 109 | return vqtbl1q_u8(input, shuffle_mask);
+ | ^~~~~~~~~~
+ | vtbl1_u8
+make[4]: *** [CMakeFiles/snappy.dir/build.make:118: CMakeFiles/snappy.dir/snappy.cc.o] Error 1
+
+As reported by [1], the vqtbl1q_u8 instruction is supported by A64
+architectures. For this reason, the patch enables the use of the
+instruction only for NEON of such architecture.
+
+[1] https://developer.arm.com/architectures/instruction-sets/intrinsics/vqtbl1q_u8
+
+Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Upstream: https://github.com/google/snappy/pull/185
+---
+ snappy-internal.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/snappy-internal.h b/snappy-internal.h
+index ae78247dbbc9..256d32344d1a 100644
+--- a/snappy-internal.h
++++ b/snappy-internal.h
+@@ -46,7 +46,7 @@
+ #include <arm_neon.h>
+ #endif
+
+-#if SNAPPY_HAVE_SSSE3 || SNAPPY_HAVE_NEON
++#if SNAPPY_HAVE_SSSE3 || (SNAPPY_HAVE_NEON && defined(__aarch64__))
+ #define SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE 1
+ #else
+ #define SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE 0
+--
+2.43.0
+
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-06-11 17:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-11 17:17 [Buildroot] [PATCH 1/2] package/snappy: bump to version 1.2.1 Dario Binacchi
2024-06-11 17:17 ` Dario Binacchi [this message]
2024-07-10 12:37 ` [Buildroot] [PATCH 2/2] package/snappy: fix compilation error raised by vqtbl1q_u8 instruction Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240611171714.3233115-2-dario.binacchi@amarulasolutions.com \
--to=dario.binacchi@amarulasolutions.com \
--cc=buildroot@buildroot.org \
--cc=linux-amarula@amarulasolutions.com \
--cc=yann.morin.1998@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.