[packages/libsodium] up to 1.0.21

atler atler at pld-linux.org
Wed Jan 7 19:25:32 CET 2026


commit 52e2677cae252e6e458ad806700f89f18066ce49
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Jan 7 19:24:43 2026 +0100

    up to 1.0.21
    
    add upstream patch to fix build on arm with neon without
    -flax-vector-conversions

 libsodium.spec   |  6 ++++--
 neon-types.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 2 deletions(-)
---
diff --git a/libsodium.spec b/libsodium.spec
index e207133..4afbc3b 100644
--- a/libsodium.spec
+++ b/libsodium.spec
@@ -6,12 +6,13 @@
 Summary:	Portable NaCl-based crypto library
 Summary(pl.UTF-8):	Przenośna biblioteka kryptograficzna oparta na NaCl
 Name:		libsodium
-Version:	1.0.20
+Version:	1.0.21
 Release:	1
 License:	BSD
 Group:		Libraries
 Source0:	https://download.libsodium.org/libsodium/releases/%{name}-%{version}.tar.gz
-# Source0-md5:	597f2c7811f84e63e45e2277dfb5da46
+# Source0-md5:	ecd60ebc2c916133db2f6b3b2e9e775d
+Patch0:		neon-types.patch
 URL:		https://libsodium.org/
 BuildRequires:	pkgconfig >= 1:0.25
 BuildRequires:	rpmbuild(macros) >= 1.527
@@ -65,6 +66,7 @@ Statyczna biblioteka libsodium.
 
 %prep
 %setup -q
+%patch -P0 -p1
 
 %build
 %configure \
diff --git a/neon-types.patch b/neon-types.patch
new file mode 100644
index 0000000..a5cd572
--- /dev/null
+++ b/neon-types.patch
@@ -0,0 +1,44 @@
+From 91fe8a46ecf09ef72885527e898fc3f9494bcfad Mon Sep 17 00:00:00 2001
+From: Frank Denis <github at pureftpd.org>
+Date: Wed, 7 Jan 2026 12:00:49 +0100
+Subject: [PATCH] Fix compilation with GCC on aarch64
+
+Use unsigned NEON intrinsics everywhere
+
+Fixes #1502
+---
+ src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c b/src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c
+index c5a27e92ec..bad4ce3898 100644
+--- a/src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c
++++ b/src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c
+@@ -37,7 +37,7 @@ typedef uint64x2_t BlockVec;
+ #    define XOR128_3(a, b, c) veorq_u64(veorq_u64((a), (b)), (c))
+ #    define SET64x2(a, b)     vsetq_lane_u64((uint64_t) (a), vmovq_n_u64((uint64_t) (b)), 1)
+ #    define BYTESHL128(a, b) \
+-        vreinterpretq_u64_u8(vextq_s8(vdupq_n_s8(0), vreinterpretq_s8_u64(a), 16 - (b)))
++        vreinterpretq_u64_u8(vextq_u8(vdupq_n_u8(0), vreinterpretq_u8_u64(a), 16 - (b)))
+ 
+ #    define AES_XENCRYPT(block_vec, rkey) \
+         vreinterpretq_u64_u8(             \
+@@ -348,12 +348,12 @@ pfx_set_bit(uint8_t ip16[16], const unsigned int bit_index, const uint8_t bit_va
+ static void
+ pfx_shift_left(uint8_t ip16[16])
+ {
+-    BlockVec       v       = LOAD128(ip16);
+-    const BlockVec shl     = vshlq_n_u8(vreinterpretq_u8_u64(v), 1);
+-    const BlockVec msb     = vshrq_n_u8(vreinterpretq_u8_u64(v), 7);
+-    const BlockVec zero    = vdupq_n_u8(0);
+-    const BlockVec carries = vextq_u8(vreinterpretq_u8_u64(msb), zero, 1);
+-    v                      = vreinterpretq_u64_u8(vorrq_u8(shl, carries));
++    BlockVec         v       = LOAD128(ip16);
++    const uint8x16_t shl     = vshlq_n_u8(vreinterpretq_u8_u64(v), 1);
++    const uint8x16_t msb     = vshrq_n_u8(vreinterpretq_u8_u64(v), 7);
++    const uint8x16_t zero    = vdupq_n_u8(0);
++    const uint8x16_t carries = vextq_u8(msb, zero, 1);
++    v                        = vreinterpretq_u64_u8(vorrq_u8(shl, carries));
+     STORE128(ip16, v);
+ }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libsodium.git/commitdiff/52e2677cae252e6e458ad806700f89f18066ce49



More information about the pld-cvs-commit mailing list