summaryrefslogtreecommitdiff
path: root/gnu/packages/gdb.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-10-19 12:51:57 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-10-19 13:11:40 -0400
commit5e2140511c1ad9ccd731438b74d61b62111da1e6 (patch)
treea4ff748ad26e121b88469b5d921001ef1382be8f /gnu/packages/gdb.scm
parent9e3a5ee417ea7fe9721be8804ff047e80c4f22ed (diff)
parent353bdae32f72b720c7ddd706576ccc40e2b43f95 (diff)
downloadguix-patches-5e2140511c1ad9ccd731438b74d61b62111da1e6.tar
guix-patches-5e2140511c1ad9ccd731438b74d61b62111da1e6.tar.gz
Merge branch 'staging'
Conflicts: gnu/packages/admin.scm gnu/packages/commencement.scm gnu/packages/gdb.scm gnu/packages/llvm.scm gnu/packages/package-management.scm gnu/packages/tls.scm
Diffstat (limited to 'gnu/packages/gdb.scm')
-rw-r--r--gnu/packages/gdb.scm67
1 files changed, 25 insertions, 42 deletions
diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm
index 11e0bb3e76..9b96fd180b 100644
--- a/gnu/packages/gdb.scm
+++ b/gnu/packages/gdb.scm
@@ -41,17 +41,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
@@ -71,20 +72,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")
@@ -117,10 +112,16 @@
`(("texinfo" ,texinfo)
("dejagnu" ,dejagnu)
("pkg-config" ,pkg-config)
- ,@(if (hurd-target?) `(("mig" ,mig)) '())))
- ;; TODO: Add support for the GDB_DEBUG_FILE_DIRECTORY environment variable
- ;; in GDB itself instead of relying on some glue code in the Guix-provided
- ;; .gdbinit file.
+ ,@(if (hurd-target?)
+ ;; When cross-compiling from x86_64-linux, make sure to use a
+ ;; 32-bit MiG because we assume target i586-pc-gnu.
+ `(("mig" ,(if (%current-target-system)
+ mig/32-bit
+ mig)))
+ '())))
+ ;; TODO: Add support for the GDB_DEBUG_FILE_DIRECTORY environment
+ ;; variable in GDB itself instead of relying on some glue code in
+ ;; the Guix-provided .gdbinit file.
(native-search-paths (list (search-path-specification
(variable "GDB_DEBUG_FILE_DIRECTORY")
(files '("lib/debug")))))
@@ -134,11 +135,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
;; <https://bugs.gnu.org/37810>.
(define-public gdb-8.2
(package
- (inherit gdb-9.1)
+ (inherit gdb)
(version "8.2.1")
(source (origin
(method url-fetch)
@@ -147,28 +155,3 @@ written in C, C++, Ada, Objective-C, Pascal and more.")
(sha256
(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
- (name "gdb-minimal")
- (inputs (fold alist-delete (package-inputs gdb)
- '("libxml2" "ncurses" "python-wrapper" "source-highlight")))))