[packages/uv] And disable lto
arekm
arekm at pld-linux.org
Fri May 1 01:54:12 CEST 2026
commit 3d93de275f10e42d0e0b194b70907b568e0a1fc1
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri May 1 01:53:58 2026 +0200
And disable lto
lto-thin-32bit.patch | 16 ----------------
lto.patch | 18 ++++++++++++++++++
uv.spec | 2 +-
3 files changed, 19 insertions(+), 17 deletions(-)
---
diff --git a/uv.spec b/uv.spec
index 4bfaaf9..a96caa5 100644
--- a/uv.spec
+++ b/uv.spec
@@ -18,7 +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
+Patch0: lto.patch
URL: https://github.com/astral-sh/uv
BuildRequires: bzip2-devel
BuildRequires: cargo
diff --git a/lto-thin-32bit.patch b/lto-thin-32bit.patch
deleted file mode 100644
index 9a2a101..0000000
--- a/lto-thin-32bit.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-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
diff --git a/lto.patch b/lto.patch
new file mode 100644
index 0000000..7c1c912
--- /dev/null
+++ b/lto.patch
@@ -0,0 +1,18 @@
+Disable LTO for 32-bit targets. Both fat and thin LTO SIGABRT during
+linking of the uv binary on i686/armv7hl/x32 because LLVM's IR/bitcode
+working set exhausts the ~3 GB process virtual address space. Without
+LTO each crate's symbols stay independent, the linker handles them one
+at a time, and peak memory stays well under the limit. Slightly larger
+and slower binary on 32-bit, but the binary builds.
+
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -383,7 +383,7 @@
+
+ [profile.release]
+ strip = true
+-lto = "fat"
++lto = false
+
+ # 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/3d93de275f10e42d0e0b194b70907b568e0a1fc1
More information about the pld-cvs-commit
mailing list