guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 16f0f497cdfef626c8f5960387037215b68d6a05
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Sun Oct 19 10:41:59 2025 +0900

    gnu: binutils: Enable zstd compression.
    
    * gnu/packages/base.scm (binutils) [native-inputs]: Add pkg-config.
    [inputs]: Add zstd:lib.
    (binutils-gold) [#:phases] {set-LD_LIBRARY_PATH}: New phase.
    
    Change-Id: I344242724b5978c98dd20d8309de02702e78cf9a
---
 gnu/packages/base.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 0045975ce9..a78478451d 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -740,7 +740,10 @@ change.  GNU make offers many powerful extensions over the 
standard utility.")
            ;; For some reason, the build machinery insists on rebuilding .info
            ;; files, even though they're already provided by the tarball.
            #:make-flags #~'("MAKEINFO=true")))
-    (native-inputs (list bison))        ;needed to build 'gprofng'
+    (native-inputs
+     (list bison                        ;needed to build 'gprofng'
+           pkg-config))
+    (inputs (list `(,zstd "lib")))
     (synopsis "Binary utilities: bfd gas gprof ld")
     (description
      "GNU Binutils is a collection of tools for working with binary files.
@@ -796,6 +799,12 @@ included.")
              (lambda _
                (substitute* "gold/Makefile.in"
                  (("/bin/sh") (which "sh")))))
+           (add-before 'check 'set-LD_LIBRARY_PATH
+             (lambda* (#:key inputs #:allow-other-keys)
+               ;; Some test binaries are linked with gold, which lack RUNPATH
+               ;; info due to not being linked with our ld-wrapper script.
+               (setenv "LD_LIBRARY_PATH"
+                       (dirname (search-input-file inputs "lib/libzstd.so")))))
            ;; Multiple failing tests on some architectures in the gold 
testsuite.
            #$@(if (or (target-arm?)
                       (target-ppc32?))

Reply via email to