guix_mirror_bot pushed a commit to branch add-compress-debug-symbols-phase
in repository guix.

commit 4c46c42d15a18c98e631bb282a46503c1e1bc63d
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Sat Oct 18 13:00:44 2025 +0900

    gnu: Add dwz.
    
    * gnu/packages/elf.scm (dwz): New variable.
    
    Co-authored-by: Danny Milosavljevic <[email protected]>
    Change-Id: I6d328109c246ee098680a14eed556d29b890a057
---
 gnu/packages/elf.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index de6c340a11..5d8c5b69db 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2024 Zheng Junjie <[email protected]>
 ;;; Copyright © 2025 John Kehayias <[email protected]>
 ;;; Copyright © 2025 Nicolas Graves <[email protected]>
+;;; Copyright © 2025 Danny Milosavljevic <[email protected]>
 ;;; Copyright © 2025 Maxim Cournoyer <[email protected]>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -43,13 +44,17 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages dejagnu)
+  #:use-module (gnu packages digest)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages gdb)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -81,6 +86,41 @@ dynamic library load path (RPATH and RUNPATH) of compiled 
programs and
 libraries.")
     (license license:gpl2+)))
 
+(define-public dwz
+  (package
+    (name "dwz")
+    (version "0.16")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://sourceware.org/ftp";
+                                  "/" name "/releases/" name "-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "03nm4yz2sd23zmw65ingphg5gk619xx9r40a5p6dhvlynkhm6n27"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
+                           (string-append "CXX=" #$(cxx-for-target))
+                           (string-append "prefix=" #$output))))
+    (native-inputs
+     (list
+      ;; XXX: binutils-gold is a complete package that not only
+      ;; provides 'gold' but also 'ld', which shadows the
+      ;; regular 'ld' (ld-wrapper), causing breakage.
+      (make-ld-wrapper "ld-wrapper" #:binutils binutils)
+      binutils-gold
+      dejagnu
+      `(,elfutils "bin")                ;for eu-strip
+      gdb/pinned
+      pkg-config))
+    (inputs (list elfutils xxhash))
+    (synopsis "DWARF optimizer")
+    (description "DWZ is a DWARF optimization and duplicate removal tool.")
+    (home-page "https://sourceware.org/dwz";)
+    (license license:gpl2+)))
+
 (define-public elfutils
   (package
     (name "elfutils")

Reply via email to