gnu: gdb: Add support for the Hurd.
* gnu/packages/gdb.scm (gdb-9.1)[native-inputs]: When compiling for the Hurd, add required build dependency mig. ["arguments"]: Add "binutils" fall-back lookup in native-inputs for cross-builds. * gnu/packages/patches/gdb-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gdb.scm (gdb-9.2): Use it.master
parent
00410bbeaf
commit
76129cd3ed
|
@ -972,6 +972,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/gcc-9-strmov-store-file-names.patch \
|
%D%/packages/patches/gcc-9-strmov-store-file-names.patch \
|
||||||
%D%/packages/patches/gd-fix-tests-on-i686.patch \
|
%D%/packages/patches/gd-fix-tests-on-i686.patch \
|
||||||
%D%/packages/patches/gd-brect-bounds.patch \
|
%D%/packages/patches/gd-brect-bounds.patch \
|
||||||
|
%D%/packages/patches/gdb-hurd.patch \
|
||||||
%D%/packages/patches/gdm-default-session.patch \
|
%D%/packages/patches/gdm-default-session.patch \
|
||||||
%D%/packages/patches/geoclue-config.patch \
|
%D%/packages/patches/geoclue-config.patch \
|
||||||
%D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \
|
%D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
;;; Copyright © 2015, 2016, 2019 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2015, 2016, 2019 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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -22,6 +23,7 @@
|
||||||
|
|
||||||
(define-module (gnu packages gdb)
|
(define-module (gnu packages gdb)
|
||||||
#:use-module (gnu packages)
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (gnu packages hurd)
|
||||||
#:use-module (gnu packages ncurses)
|
#:use-module (gnu packages ncurses)
|
||||||
#:use-module (gnu packages readline)
|
#:use-module (gnu packages readline)
|
||||||
#:use-module (gnu packages dejagnu)
|
#:use-module (gnu packages dejagnu)
|
||||||
|
@ -68,12 +70,14 @@
|
||||||
#t))
|
#t))
|
||||||
(add-after
|
(add-after
|
||||||
'install 'remove-libs-already-in-binutils
|
'install 'remove-libs-already-in-binutils
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs native-inputs outputs
|
||||||
|
#: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 (assoc-ref inputs "binutils"))
|
(let* ((binutils (or (assoc-ref 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")
|
||||||
|
@ -98,11 +102,15 @@
|
||||||
|
|
||||||
;; Allow use of XML-formatted syscall information. This enables 'catch
|
;; Allow use of XML-formatted syscall information. This enables 'catch
|
||||||
;; syscall' and similar commands.
|
;; syscall' and similar commands.
|
||||||
("libxml2" ,libxml2)))
|
("libxml2" ,libxml2)
|
||||||
|
|
||||||
|
;; The Hurd needs -lshouldbeinlibc.
|
||||||
|
,@(if (hurd-target?) `(("hurd" ,hurd)) '())))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("texinfo" ,texinfo)
|
`(("texinfo" ,texinfo)
|
||||||
("dejagnu" ,dejagnu)
|
("dejagnu" ,dejagnu)
|
||||||
("pkg-config" ,pkg-config)))
|
("pkg-config" ,pkg-config)
|
||||||
|
,@(if (hurd-target?) `(("mig" ,mig)) '())))
|
||||||
(home-page "https://www.gnu.org/software/gdb/")
|
(home-page "https://www.gnu.org/software/gdb/")
|
||||||
(synopsis "The GNU debugger")
|
(synopsis "The GNU debugger")
|
||||||
(description
|
(description
|
||||||
|
@ -140,6 +148,7 @@ written in C, C++, Ada, Objective-C, Pascal and more.")
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "mirror://gnu/gdb/gdb-"
|
(uri (string-append "mirror://gnu/gdb/gdb-"
|
||||||
version ".tar.xz"))
|
version ".tar.xz"))
|
||||||
|
(patches (search-patches "gdb-hurd.patch"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0mf5fn8v937qwnal4ykn3ji1y2sxk0fa1yfqi679hxmpg6pdf31n"))))))
|
"0mf5fn8v937qwnal4ykn3ji1y2sxk0fa1yfqi679hxmpg6pdf31n"))))))
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
Taken from upstream, removed ChangeLog.
|
||||||
|
|
||||||
|
From 6930bffe3373690b3431d6291f9f7c116d6a1ec4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||||
|
Date: Sat, 30 May 2020 18:35:59 +0000
|
||||||
|
Subject: [PATCH] hurd: fix gnu_debug_flag type
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Fixes
|
||||||
|
|
||||||
|
../../gdb/gnu-nat.c:96:6: error: conflicting declaration ‘bool gnu_debug_flag’
|
||||||
|
96 | bool gnu_debug_flag = false;
|
||||||
|
../../gdb/gnu-nat.c: In function ‘void _initialize_gnu_nat()’:
|
||||||
|
../../gdb/gnu-nat.c:3511:7: error: cannot
|
||||||
|
|
||||||
|
gdb/ChangeLog:
|
||||||
|
|
||||||
|
* gnu-nat.h (gnu_debug_flag): Set type to bool.
|
||||||
|
---
|
||||||
|
gdb/ChangeLog | 4 ++++
|
||||||
|
gdb/gnu-nat.h | 2 +-
|
||||||
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/gdb/gnu-nat.h b/gdb/gnu-nat.h
|
||||||
|
index 77c57817b2..766f716587 100644
|
||||||
|
--- a/gdb/gnu-nat.h
|
||||||
|
+++ b/gdb/gnu-nat.h
|
||||||
|
@@ -111,7 +111,7 @@ extern char *proc_string (struct proc *proc);
|
||||||
|
__proc_pid (__proc), __proc->tid, \
|
||||||
|
host_address_to_string (__proc) , ##args); } while (0)
|
||||||
|
|
||||||
|
-extern int gnu_debug_flag;
|
||||||
|
+extern bool gnu_debug_flag;
|
||||||
|
|
||||||
|
#define debug(msg, args...) \
|
||||||
|
do { if (gnu_debug_flag) \
|
||||||
|
--
|
||||||
|
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
|
||||||
|
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
|
||||||
|
|
||||||
|
commit 366f550a593c7e6bae3699a4b6d65fe937af5603
|
||||||
|
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||||
|
Date: Sat May 30 18:41:30 2020 +0000
|
||||||
|
|
||||||
|
hurd: add missing include
|
||||||
|
|
||||||
|
Fixes
|
||||||
|
|
||||||
|
../../gdb/gnu-nat.c:2522:14: error: ‘target_gdbarch’ was not declared in this scope; did you mean ‘target_detach’?
|
||||||
|
2522 | paddress (target_gdbarch (), memaddr), pulongest (len),
|
||||||
|
|
||||||
|
gdb/Changelog:
|
||||||
|
|
||||||
|
* gnu-nat.c: Include "gdbarch.h".
|
||||||
|
|
||||||
|
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
|
||||||
|
index 3b438a9a43..9b93488b41 100644
|
||||||
|
--- a/gdb/gnu-nat.c
|
||||||
|
+++ b/gdb/gnu-nat.c
|
||||||
|
@@ -64,6 +64,7 @@ extern "C"
|
||||||
|
#include "language.h"
|
||||||
|
#include "target.h"
|
||||||
|
#include "gdbsupport/gdb_wait.h"
|
||||||
|
+#include "gdbarch.h"
|
||||||
|
#include "gdbcmd.h"
|
||||||
|
#include "gdbcore.h"
|
||||||
|
#include "gdbthread.h"
|
Reference in New Issue