mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: gdb: Use G-expressions.
* gnu/packages/gdb.scm (gdb/pinned): Use G-expressions. (gdb-minimal gdb-multiarch, avr-gdb): ): Update acordingly. Change-Id: Ifcdc6a337ec9c4d5c4303082d207b657cbc34765
This commit is contained in:
parent
eb959d5a63
commit
773aa7a60b
1 changed files with 55 additions and 51 deletions
|
@ -4,7 +4,7 @@
|
||||||
;;; Copyright © 2015, 2016, 2019, 2021, 2023 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2015, 2016, 2019, 2021, 2023 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
|
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
|
||||||
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
|
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
|
||||||
;;; Copyright © 2020, 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
;;; Copyright © 2020, 2021, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
|
||||||
;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
|
@ -38,6 +38,7 @@
|
||||||
#:use-module (gnu packages python)
|
#:use-module (gnu packages python)
|
||||||
#:use-module (gnu packages pkg-config)
|
#:use-module (gnu packages pkg-config)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix gexp)
|
||||||
#:use-module ((guix licenses) #:select (gpl3+))
|
#:use-module ((guix licenses) #:select (gpl3+))
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
@ -61,43 +62,44 @@
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(outputs '("out" "debug"))
|
(outputs '("out" "debug"))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ;FIXME: 217 unexpected failures
|
(list
|
||||||
#:out-of-source? #t
|
#:tests? #f ;FIXME: 217 unexpected failures
|
||||||
#:modules ((srfi srfi-1)
|
#:out-of-source? #t
|
||||||
|
#:modules `((srfi srfi-1)
|
||||||
,@%default-gnu-modules)
|
,@%default-gnu-modules)
|
||||||
#:phases (modify-phases %standard-phases
|
#:phases #~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'patch-paths
|
(add-after 'unpack 'patch-paths
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let ((sh (string-append (assoc-ref inputs "bash")
|
(let ((sh (string-append (assoc-ref inputs "bash")
|
||||||
"/bin/sh")))
|
"/bin/sh")))
|
||||||
(substitute* '("gdb/ser-pipe.c"
|
(substitute* '("gdb/ser-pipe.c"
|
||||||
"gdbsupport/pathstuff.cc")
|
"gdbsupport/pathstuff.cc")
|
||||||
(("\"/bin/sh\"")
|
(("\"/bin/sh\"")
|
||||||
(format #f "~s" sh))))))
|
(format #f "~s" sh))))))
|
||||||
(add-after 'configure 'post-configure
|
(add-after 'configure 'post-configure
|
||||||
(lambda _
|
(lambda _
|
||||||
(for-each patch-makefile-SHELL
|
(for-each patch-makefile-SHELL
|
||||||
(find-files "." "Makefile\\.in"))))
|
(find-files "." "Makefile\\.in"))))
|
||||||
(add-after 'install 'remove-libs-already-in-binutils
|
(add-after 'install 'remove-libs-already-in-binutils
|
||||||
(lambda* (#:key native-inputs inputs outputs
|
(lambda* (#:key native-inputs inputs outputs
|
||||||
#:allow-other-keys)
|
#:allow-other-keys)
|
||||||
;; Like Binutils, GDB installs libbfd, libopcodes, etc.
|
;; Like Binutils, GDB installs libbfd, libopcodes, etc.
|
||||||
;; However, this leads to collisions when both are
|
;; However, this leads to collisions when both are
|
||||||
;; installed, and really is none of its business,
|
;; installed, and really is none of its business,
|
||||||
;; conceptually. So remove them.
|
;; conceptually. So remove them.
|
||||||
(let* ((binutils (or (assoc-ref inputs "binutils")
|
(let* ((binutils (or (assoc-ref inputs "binutils")
|
||||||
(assoc-ref native-inputs "binutils")))
|
(assoc-ref native-inputs "binutils")))
|
||||||
(out (assoc-ref outputs "out"))
|
(out (assoc-ref outputs "out"))
|
||||||
(files1 (with-directory-excursion binutils
|
(files1 (with-directory-excursion binutils
|
||||||
(append (find-files "lib")
|
(append (find-files "lib")
|
||||||
(find-files "include"))))
|
(find-files "include"))))
|
||||||
(files2 (with-directory-excursion out
|
(files2 (with-directory-excursion out
|
||||||
(append (find-files "lib")
|
(append (find-files "lib")
|
||||||
(find-files "include"))))
|
(find-files "include"))))
|
||||||
(common (lset-intersection string=?
|
(common (lset-intersection string=?
|
||||||
files1 files2)))
|
files1 files2)))
|
||||||
(with-directory-excursion out
|
(with-directory-excursion out
|
||||||
(for-each delete-file common))))))))
|
(for-each delete-file common))))))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("bash" ,bash)
|
`(("bash" ,bash)
|
||||||
("expat" ,expat)
|
("expat" ,expat)
|
||||||
|
@ -166,13 +168,14 @@ written in C, C++, Ada, Objective-C, Pascal and more.")
|
||||||
(package/inherit gdb-14
|
(package/inherit gdb-14
|
||||||
(name "gdb-multiarch")
|
(name "gdb-multiarch")
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
(append
|
||||||
(list "--enable-targets=all"
|
(list #:configure-flags
|
||||||
"--enable-multilib"
|
#~(list "--enable-targets=all"
|
||||||
"--enable-interwork"
|
"--enable-multilib"
|
||||||
"--enable-languages=c,c++"
|
"--enable-interwork"
|
||||||
"--disable-nls")
|
"--enable-languages=c,c++"
|
||||||
,@(package-arguments gdb-14)))
|
"--disable-nls"))
|
||||||
|
(package-arguments gdb-14)))
|
||||||
(synopsis "The GNU debugger (with all architectures enabled)")))
|
(synopsis "The GNU debugger (with all architectures enabled)")))
|
||||||
|
|
||||||
(define-public gdb-minimal
|
(define-public gdb-minimal
|
||||||
|
@ -185,13 +188,14 @@ written in C, C++, Ada, Objective-C, Pascal and more.")
|
||||||
(package/inherit gdb-14
|
(package/inherit gdb-14
|
||||||
(name "avr-gdb")
|
(name "avr-gdb")
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
(append
|
||||||
(list "--target=avr"
|
(list #:configure-flags
|
||||||
"--disable-nls"
|
#~(list "--target=avr"
|
||||||
"--enable-languages=c,c++"
|
"--disable-nls"
|
||||||
"--with-system-readline"
|
"--enable-languages=c,c++"
|
||||||
"--enable-source-highlight")
|
"--with-system-readline"
|
||||||
,@(package-arguments gdb-14)))
|
"--enable-source-highlight"))
|
||||||
|
(package-arguments gdb-14)))
|
||||||
(synopsis "The GNU Debugger for AVR")
|
(synopsis "The GNU Debugger for AVR")
|
||||||
(description
|
(description
|
||||||
"GDB is the GNU debugger. With it, you can monitor what a program is
|
"GDB is the GNU debugger. With it, you can monitor what a program is
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue