Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Apr 2023 14:18:02 GMT
From:      Robert Clausecker <fuz@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 9a0a2422622d - main - archivers/snappy: fix build on armv7
Message-ID:  <202304141418.33EEI2MF008525@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9a0a2422622d5feee7d77ddc954540daff449a1d

commit 9a0a2422622d5feee7d77ddc954540daff449a1d
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2023-04-13 12:54:28 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-04-14 14:16:09 +0000

    archivers/snappy: fix build on armv7
    
    A recent commit introduced NEON intrinsics that are only available on
    aarch64.  Work around this problem by adding polyfill for the missing
    intrinsic.
    
    Approved by:    portmgr (build fix blanket)
    Obtained from:  https://stackoverflow.com/a/70154591/417501
    See also:       https://groups.google.com/g/snappy-compression/c/m1ZNPsobiQs
    MFH:            2023Q2
---
 archivers/snappy/files/patch-snappy-internal.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/archivers/snappy/files/patch-snappy-internal.h b/archivers/snappy/files/patch-snappy-internal.h
new file mode 100644
index 000000000000..c00d2397a50c
--- /dev/null
+++ b/archivers/snappy/files/patch-snappy-internal.h
@@ -0,0 +1,18 @@
+--- snappy-internal.h.orig	2023-04-13 12:38:13 UTC
++++ snappy-internal.h
+@@ -102,6 +102,15 @@ inline void V128_StoreU(V128* dst, V128 val) {
+   vst1q_u8(reinterpret_cast<uint8_t*>(dst), val);
+ }
+ 
++#ifdef __arm__
++inline uint8x16_t vqtbl1q_u8(uint8x16_t table, uint8x16_t idx) {
++  uint8x8x2_t table2{vget_low_u8(table), vget_high_u8(table)};
++  uint8x8_t lo = vtbl2_u8(table2, vget_low_u8(idx));
++  uint8x8_t hi = vtbl2_u8(table2, vget_high_u8(idx));
++  return vcombine_u8(lo, hi);
++}
++#endif
++
+ inline V128 V128_Shuffle(V128 input, V128 shuffle_mask) {
+   assert(vminvq_u8(shuffle_mask) >= 0 && vmaxvq_u8(shuffle_mask) <= 15);
+   return vqtbl1q_u8(input, shuffle_mask);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304141418.33EEI2MF008525>