summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2022-05-20 18:57:41 +0000
committerZach van Rijn <me@zv.io>2022-05-20 19:45:42 +0000
commit00b1e49f992d7b003e68e6b61f29d3f2f04573f5 (patch)
treed20e32d4820a38cf09604f830662cbe2d68bc082
parente424ab3bfe9fda0188d75567eacf94bf208759ce (diff)
downloadpackages-00b1e49f992d7b003e68e6b61f29d3f2f04573f5.tar.gz
packages-00b1e49f992d7b003e68e6b61f29d3f2f04573f5.tar.bz2
packages-00b1e49f992d7b003e68e6b61f29d3f2f04573f5.tar.xz
packages-00b1e49f992d7b003e68e6b61f29d3f2f04573f5.zip
system/libarchive: add patch for unaligned access on 32-bit arm. fixes #672.
-rw-r--r--system/libarchive/APKBUILD6
-rw-r--r--system/libarchive/disable-unaligned-access-arm32-xxhash.patch12
2 files changed, 16 insertions, 2 deletions
diff --git a/system/libarchive/APKBUILD b/system/libarchive/APKBUILD
index 334b774a7..71f2ee54b 100644
--- a/system/libarchive/APKBUILD
+++ b/system/libarchive/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libarchive
pkgver=3.6.1
-pkgrel=0
+pkgrel=1
pkgdesc="Multi-format archive and compression library"
url="https://libarchive.org/"
arch="all"
@@ -13,6 +13,7 @@ makedepends="zlib-dev bzip2-dev xz-dev lz4-dev acl-dev openssl-dev expat-dev
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://github.com/libarchive/libarchive/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz
disable-locale-tests.patch
+ disable-unaligned-access-arm32-xxhash.patch
"
# secfixes:
@@ -58,4 +59,5 @@ tools() {
}
sha512sums="58f7ac0c52116f73326a07dec10ff232be33b318862078785dc39f1fb2f8773b5194eabfa14764bb51ce6a5a1aa8820526e7f4c76087a6f4fcbe7789a22275b4 libarchive-3.6.1.tar.gz
-27cf2aaa3e70e3a2a9944fac0c96c411e669c7e1a48daad1423bff68eef0f49153e5ef9d22dc9591a65353119d7fe203a28258ab82278aeb86b46fe691bcfb6a disable-locale-tests.patch"
+27cf2aaa3e70e3a2a9944fac0c96c411e669c7e1a48daad1423bff68eef0f49153e5ef9d22dc9591a65353119d7fe203a28258ab82278aeb86b46fe691bcfb6a disable-locale-tests.patch
+56a2b13b6cd7b127c04ac50ebf49994ec91ff2467d5d0f32b8428bd4df82b167459d4630dee5d1b5119f70b04ea6fe4411d44b768e0f313fa302c9e5fe51b7cd disable-unaligned-access-arm32-xxhash.patch"
diff --git a/system/libarchive/disable-unaligned-access-arm32-xxhash.patch b/system/libarchive/disable-unaligned-access-arm32-xxhash.patch
new file mode 100644
index 000000000..0b24a8854
--- /dev/null
+++ b/system/libarchive/disable-unaligned-access-arm32-xxhash.patch
@@ -0,0 +1,12 @@
+diff -ur a/libarchive/xxhash.c b/libarchive/xxhash.c
+--- a/libarchive/xxhash.c 2022-05-20 18:47:43.907673368 +0000
++++ b/libarchive/xxhash.c 2022-05-20 18:49:43.019255133 +0000
+@@ -46,7 +46,7 @@
+ ** If you know your target CPU supports unaligned memory access, you want to force this option manually to improve performance.
+ ** You can also enable this parameter if you know your input data will always be aligned (boundaries of 4, for U32).
+ */
+-#if defined(__ARM_FEATURE_UNALIGNED) || defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
++#if (defined(__ARM_FEATURE_UNALIGNED) && defined(__aarch64__)) || defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
+ # define XXH_USE_UNALIGNED_ACCESS 1
+ #endif
+