[packages/uv] Try thin lto on 32bit pointer to avoid sigabrt
arekm
arekm at pld-linux.org
Fri May 1 01:41:30 CEST 2026
commit 7785836d2fca800e933858bbe0655999c5f92140
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri May 1 01:41:09 2026 +0200
Try thin lto on 32bit pointer to avoid sigabrt
lto-thin-32bit.patch | 16 ++++++++++++++++
uv.spec | 4 ++++
2 files changed, 20 insertions(+)
---
diff --git a/uv.spec b/uv.spec
index c4f6db0..4bfaaf9 100644
--- a/uv.spec
+++ b/uv.spec
@@ -18,6 +18,7 @@ Source0: https://github.com/astral-sh/uv/archive/%{version}/%{name}-%{version}.t
# tar cJf uv-crates-%%{version}.tar.xz vendor Cargo.lock
Source1: %{name}-crates-%{crates_ver}.tar.xz
# Source1-md5: 2ff89da4d7c0cdb37b70d94652dd815d
+Patch0: lto-thin-32bit.patch
URL: https://github.com/astral-sh/uv
BuildRequires: bzip2-devel
BuildRequires: cargo
@@ -88,6 +89,9 @@ Zshowe dopełnianie składni dla polecenia uv.
%prep
%setup -q -a1
+%ifarch %{ix86} %{arm} x32
+%patch -P0 -p1
+%endif
# use our offline registry
export CARGO_HOME="$(pwd)/.cargo"
diff --git a/lto-thin-32bit.patch b/lto-thin-32bit.patch
new file mode 100644
index 0000000..9a2a101
--- /dev/null
+++ b/lto-thin-32bit.patch
@@ -0,0 +1,16 @@
+Use thin LTO for 32-bit targets to avoid SIGABRT during fat-LTO link
+of the uv binary, which exhausts the ~3 GB process address space on
+i686/armv7hl/x32. Thin LTO retains most of the optimization benefit at
+a fraction of the peak link-time memory.
+
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -383,7 +383,7 @@
+
+ [profile.release]
+ strip = true
+-lto = "fat"
++lto = "thin"
+
+ # This profile is meant to mimic the `release` profile as closely as
+ # possible, but using settings that are more beneficial for iterative
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/uv.git/commitdiff/7785836d2fca800e933858bbe0655999c5f92140
More information about the pld-cvs-commit
mailing list