From ef2a3871fdebb5aa2b34fefbeec8d7be92e6097e Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 27 Jun 2020 10:32:48 +0200 Subject: gnu: GDB: Inline cross-compilation fix. * gnu/packages/gdb.scm (gdb-9.1)[arguments]: Remove conditionals on %CURRENT-TARGET-SYSTEM. --- gnu/packages/gdb.scm | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'gnu/packages/gdb.scm') diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm index 38e45b14e5..338b73aa58 100644 --- a/gnu/packages/gdb.scm +++ b/gnu/packages/gdb.scm @@ -70,20 +70,14 @@ #t)) (add-after 'install 'remove-libs-already-in-binutils - (lambda* (#:key inputs outputs - ;; TODO: Inline the native-inputs addition and - ;; below usage in the next rebuild cycle. - ,@(if (%current-target-system) - '(native-inputs) - '()) + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) ;; Like Binutils, GDB installs libbfd, libopcodes, etc. ;; However, this leads to collisions when both are ;; installed, and really is none of its business, ;; conceptually. So remove them. - (let* ((binutils ,@(if (%current-target-system) - '((assoc-ref native-inputs "binutils")) - '((assoc-ref inputs "binutils")))) + (let* ((binutils (or (assoc-ref inputs "binutils") + (assoc-ref native-inputs "binutils"))) (out (assoc-ref outputs "out")) (files1 (with-directory-excursion binutils (append (find-files "lib") -- cgit v1.2.3 From a62df7cd72423e9ea7cf030a4db034c548eeb59e Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 27 Jun 2020 10:37:19 +0200 Subject: gnu: GDB: Remove version 9.1. * gnu/packages/gdb.scm (gdb-9.1): Rename to ... (gdb): ... this. Update to 9.2. [source](patches): Add 'gdb-hurd.patch'. (gdb-8.2): Inherit from GDB instead of GDB-9.1. (gdb-9.2): Remove variable. (gdb-minimal): Inherit from GDB instead of GDB-9.2. --- gnu/packages/gdb.scm | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) (limited to 'gnu/packages/gdb.scm') diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm index 338b73aa58..2615f1f158 100644 --- a/gnu/packages/gdb.scm +++ b/gnu/packages/gdb.scm @@ -40,17 +40,18 @@ #:use-module (guix build-system gnu) #:use-module (srfi srfi-1)) -(define-public gdb-9.1 +(define-public gdb (package (name "gdb") - (version "9.1") + (version "9.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gdb/gdb-" version ".tar.xz")) + (patches (search-patches "gdb-hurd.patch")) (sha256 (base32 - "0dqp1p7w836iwijg1zb4a784n0j4pyjiw5v6h8fg5lpx6b40x7k9")))) + "0mf5fn8v937qwnal4ykn3ji1y2sxk0fa1yfqi679hxmpg6pdf31n")))) (build-system gnu-build-system) (arguments @@ -125,7 +126,7 @@ written in C, C++, Ada, Objective-C, Pascal and more.") ;; . (define-public gdb-8.2 (package - (inherit gdb-9.1) + (inherit gdb) (version "8.2.1") (source (origin (method url-fetch) @@ -135,27 +136,9 @@ written in C, C++, Ada, Objective-C, Pascal and more.") (base32 "00i27xqawjv282a07i73lp1l02n0a3ywzhykma75qg500wll6sha")))))) -(define-public gdb - ;; This is the fixed version that packages depend on. Update it rarely - ;; enough to avoid massive rebuilds. - gdb-9.1) - -(define-public gdb-9.2 - (package - (inherit gdb) - (version "9.2") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/gdb/gdb-" - version ".tar.xz")) - (patches (search-patches "gdb-hurd.patch")) - (sha256 - (base32 - "0mf5fn8v937qwnal4ykn3ji1y2sxk0fa1yfqi679hxmpg6pdf31n")))))) - (define-public gdb-minimal (package/inherit - gdb-9.2 + gdb (name "gdb-minimal") (inputs (fold alist-delete (package-inputs gdb) '("guile" "libxml2" "ncurses" "python-wrapper" -- cgit v1.2.3 From c007d868686fc2f9bf02a34150d4f0ac72b1f8d2 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 27 Jun 2020 12:34:48 +0200 Subject: gnu: gdb@8.2: Inherit from 'gdb-minimal'. * gnu/packages/gdb.scm (gdb-minimal): Move definition up. (gdb-8.2): Rename to ... (gdb-minimal-8.2): ... this. Inherit from GDB-MINIMAL. * gnu/packages/rust.scm (rust-1.27)[native-inputs]: Adjust for the rename. --- gnu/packages/gdb.scm | 18 +++++++++--------- gnu/packages/rust.scm | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'gnu/packages/gdb.scm') diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm index 56d37960f7..f2f272cc90 100644 --- a/gnu/packages/gdb.scm +++ b/gnu/packages/gdb.scm @@ -122,11 +122,18 @@ the program is running to try to fix bugs. It can be used to debug programs written in C, C++, Ada, Objective-C, Pascal and more.") (license gpl3+))) +(define-public gdb-minimal + (package/inherit + gdb + (name "gdb-minimal") + (inputs (fold alist-delete (package-inputs gdb) + '("libxml2" "ncurses" "python-wrapper" "source-highlight"))))) + ;; This version of GDB is required by some of the Rust compilers, see ;; . -(define-public gdb-8.2 +(define-public gdb-minimal-8.2 (package - (inherit gdb) + (inherit gdb-minimal) (version "8.2.1") (source (origin (method url-fetch) @@ -135,10 +142,3 @@ written in C, C++, Ada, Objective-C, Pascal and more.") (sha256 (base32 "00i27xqawjv282a07i73lp1l02n0a3ywzhykma75qg500wll6sha")))))) - -(define-public gdb-minimal - (package/inherit - gdb - (name "gdb-minimal") - (inputs (fold alist-delete (package-inputs gdb) - '("libxml2" "ncurses" "python-wrapper" "source-highlight"))))) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index b084a6df9e..fe43e72421 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -828,7 +828,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" (native-inputs ;; FIXME: Rust 1.27 and some later versions require GDB 8.2 specifically. ;; See . - (alist-replace "gdb" (list gdb-8.2) + (alist-replace "gdb" (list gdb-minimal-8.2) (package-native-inputs base-rust))) (arguments (substitute-keyword-arguments (package-arguments base-rust) -- cgit v1.2.3 From 5e6d583954b8ca9c4ab2eed3347a92a3ad7ad6fb Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 2 Jul 2020 23:26:46 +0200 Subject: gnu: gdb@8.2: Inherit from the 'full' gdb. This reverts commit c007d868686fc2f9bf02a34150d4f0ac72b1f8d2, because later versions of Rust requires loading Python plugins. * gnu/packages/gdb.scm (gdb-minimal-8.2): Rename to ... (gdb-8.2): ... this. Adjust inheritance accordingly. * gnu/packages/rust.scm (rust-1.27)[native-inputs]: Adjust accordingly. --- gnu/packages/gdb.scm | 4 ++-- gnu/packages/rust.scm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/gdb.scm') diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm index f2f272cc90..b836228506 100644 --- a/gnu/packages/gdb.scm +++ b/gnu/packages/gdb.scm @@ -131,9 +131,9 @@ written in C, C++, Ada, Objective-C, Pascal and more.") ;; This version of GDB is required by some of the Rust compilers, see ;; . -(define-public gdb-minimal-8.2 +(define-public gdb-8.2 (package - (inherit gdb-minimal) + (inherit gdb) (version "8.2.1") (source (origin (method url-fetch) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index fe43e72421..b084a6df9e 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -828,7 +828,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" (native-inputs ;; FIXME: Rust 1.27 and some later versions require GDB 8.2 specifically. ;; See . - (alist-replace "gdb" (list gdb-minimal-8.2) + (alist-replace "gdb" (list gdb-8.2) (package-native-inputs base-rust))) (arguments (substitute-keyword-arguments (package-arguments base-rust) -- cgit v1.2.3