guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 87a23070f2992d41942c6d3683329c7480303e04
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Sun Oct 19 10:42:31 2025 +0900
gnu: binutils: Use zstd compression level 19.
* gnu/packages/base.scm (binutils) [#:phases]
{use-zstd-compression-level-19}: New phase.
(binutils-gold) [#:phases]
{use-zstd-compression-level-19-for-gold}: New phase.
Change-Id: I0e75329bb231dba39db61a880eb306c58c0acc11
---
gnu/packages/base.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index a78478451d..31809316be 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -736,6 +736,14 @@ change. GNU make offers many powerful extensions over the
standard utility.")
"--enable-lto"
"--enable-separate-code"
"--enable-threads")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'use-zstd-compression-level-19
+ (lambda _
+ ;; The default level (3) is hard-coded. Use a higher level
to
+ ;; compact debug sections as much as possible.
+ (substitute* "bfd/compress.c"
+ (("ZSTD_CLEVEL_DEFAULT") "19")))))
;; For some reason, the build machinery insists on rebuilding .info
;; files, even though they're already provided by the tarball.
@@ -795,6 +803,12 @@ included.")
(delete "LDFLAGS=-static-libgcc" #$flags)))
((#:phases phases '%standard-phases)
#~(modify-phases #$phases
+ (add-after 'unpack 'use-zstd-compression-level-19-for-gold
+ (lambda _
+ ;; The default level (3) is hard-coded. Use a higher level to
+ ;; compact debug sections as much as possible.
+ (substitute* "gold/compressed_output.cc"
+ (("ZSTD_CLEVEL_DEFAULT") "19"))))
(add-after 'patch-source-shebangs 'patch-more-shebangs
(lambda _
(substitute* "gold/Makefile.in"