mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-17 07:11:29 +02:00
depends: libsodium: update to 1.0.21
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
package=libsodium
|
package=libsodium
|
||||||
$(package)_version=1.0.20
|
$(package)_version=1.0.21
|
||||||
$(package)_download_path=https://download.libsodium.org/libsodium/releases/
|
$(package)_download_path=https://download.libsodium.org/libsodium/releases/
|
||||||
$(package)_file_name=libsodium-$($(package)_version).tar.gz
|
$(package)_file_name=libsodium-$($(package)_version).tar.gz
|
||||||
$(package)_sha256_hash=ebb65ef6ca439333c2bb41a0c1990587288da07f6c7fd07cb3a18cc18d30ce19
|
$(package)_sha256_hash=9e4285c7a419e82dedb0be63a72eea357d6943bc3e28e6735bf600dd4883feaf
|
||||||
$(package)_patches += fix-blake2b-symbol-naming.patch
|
$(package)_patches=fix-aarch64.patch fix-blake2b-symbol-naming.patch
|
||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_config_opts=--enable-static --disable-shared
|
$(package)_config_opts=--enable-static --disable-shared
|
||||||
@@ -13,7 +13,8 @@ endef
|
|||||||
define $(package)_preprocess_cmds
|
define $(package)_preprocess_cmds
|
||||||
rm -rf builds/msvc &&\
|
rm -rf builds/msvc &&\
|
||||||
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux/ && \
|
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux/ && \
|
||||||
patch -p1 -i $($(package)_patch_dir)/fix-blake2b-symbol-naming.patch
|
patch -p1 -i $($(package)_patch_dir)/fix-blake2b-symbol-naming.patch && \
|
||||||
|
patch -p1 -i $($(package)_patch_dir)/fix-aarch64.patch
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
From 6702f69bef6044163acc7715e6ac7e430890ce78 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Frank Denis <github@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
|
||||||
|
|
||||||
|
diff --git a/src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c b/src/libsodium/crypto_ipcrypt/ipcrypt_armcrypto.c
|
||||||
|
index c5a27e92..bad4ce38 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.52.0
|
||||||
|
|
||||||
Reference in New Issue
Block a user