diff options
author | Viorel Munteanu <ceamac@gentoo.org> | 2024-07-05 08:34:18 +0300 |
---|---|---|
committer | Viorel Munteanu <ceamac@gentoo.org> | 2024-07-05 08:42:48 +0300 |
commit | a760727c2c9e90293c566060a90f5aedce48bdda (patch) | |
tree | c0ba05952c81276ba48e1f7b4260d5cb593059b9 /sys-apps | |
parent | dev-ruby/sequel: drop 5.77.0 (diff) | |
download | gentoo-a760727c2c9e90293c566060a90f5aedce48bdda.tar.gz gentoo-a760727c2c9e90293c566060a90f5aedce48bdda.tar.bz2 gentoo-a760727c2c9e90293c566060a90f5aedce48bdda.zip |
sys-apps/busybox: skip some dynamic relocations on 32-bit i386
Disable using HW sha1 and sha256 on 32 bit i386.
This caused musl build to fail.
The code only worked on SSSE CPUs.
Closes: https://bugs.gentoo.org/933771
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/busybox/busybox-1.36.1-r3.ebuild (renamed from sys-apps/busybox/busybox-1.36.1-r2.ebuild) | 2 | ||||
-rw-r--r-- | sys-apps/busybox/files/busybox-1.36.1-skip-dynamic-relocations.patch | 43 |
2 files changed, 45 insertions, 0 deletions
diff --git a/sys-apps/busybox/busybox-1.36.1-r2.ebuild b/sys-apps/busybox/busybox-1.36.1-r3.ebuild index cd06d97bc0d3..a0e6e95cf3f2 100644 --- a/sys-apps/busybox/busybox-1.36.1-r2.ebuild +++ b/sys-apps/busybox/busybox-1.36.1-r3.ebuild @@ -83,6 +83,8 @@ PATCHES=( "${FILESDIR}"/${PN}-1.36.0-fortify-source-3-fixdep.patch "${FILESDIR}"/${PN}-1.36.1-kernel-6.8.patch + "${FILESDIR}"/${PN}-1.36.1-skip-dynamic-relocations.patch + # "${FILESDIR}"/${P}-*.patch ) diff --git a/sys-apps/busybox/files/busybox-1.36.1-skip-dynamic-relocations.patch b/sys-apps/busybox/files/busybox-1.36.1-skip-dynamic-relocations.patch new file mode 100644 index 000000000000..4da0d4666ef3 --- /dev/null +++ b/sys-apps/busybox/files/busybox-1.36.1-skip-dynamic-relocations.patch @@ -0,0 +1,43 @@ +https://git.alpinelinux.org/aports/plain/main/busybox/0025-Hackfix-to-disable-HW-acceleration-for-MD5-SHA1-on-x.patch +https://bugs.gentoo.org/933771 + +From 3ead51e53687e94a51beb793661363df27b00814 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net> +Date: Thu, 5 Jan 2023 15:47:55 +0100 +Subject: [PATCH] Hackfix to disable HW acceleration for MD5/SHA1 on x86 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This causes a direct segfault with musl libc. + +See: http://lists.busybox.net/pipermail/busybox/2023-January/090078.html +--- a/libbb/hash_md5_sha.c ++++ b/libbb/hash_md5_sha.c +@@ -14,7 +14,7 @@ + #define NEED_SHA512 (ENABLE_SHA512SUM || ENABLE_USE_BB_CRYPT_SHA) + + #if ENABLE_SHA1_HWACCEL || ENABLE_SHA256_HWACCEL +-# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) ++# if defined(__GNUC__) && defined(__x86_64__) + static void cpuid(unsigned *eax, unsigned *ebx, unsigned *ecx, unsigned *edx) + { + asm ("cpuid" +@@ -1173,7 +1173,7 @@ void FAST_FUNC sha1_begin(sha1_ctx_t *ctx) + ctx->total64 = 0; + ctx->process_block = sha1_process_block64; + #if ENABLE_SHA1_HWACCEL +-# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) ++# if defined(__GNUC__) && defined(__x86_64__) + { + if (!shaNI) { + unsigned eax = 7, ebx = ebx, ecx = 0, edx = edx; +@@ -1227,7 +1227,7 @@ void FAST_FUNC sha256_begin(sha256_ctx_t *ctx) + /*ctx->total64 = 0; - done by prepending two 32-bit zeros to init256 */ + ctx->process_block = sha256_process_block64; + #if ENABLE_SHA256_HWACCEL +-# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) ++# if defined(__GNUC__) && defined(__x86_64__) + { + if (!shaNI) { + unsigned eax = 7, ebx = ebx, ecx = 0, edx = edx; |