From: Chadwain Holness <chadwainholness@gmail.com>
To: 54052@debbugs.gnu.org, ludo@gnu.org
Cc: Chadwain Holness <chadwainholness@gmail.com>
Subject: [bug#54052] [PATCH] gnu: cgdb: Reference gdb
Date: Sun, 6 Mar 2022 01:24:36 -0500 [thread overview]
Message-ID: <20220306062434.17898-1-chadwainholness@gmail.com> (raw)
In-Reply-To: <87mti6vfm9.fsf_-_@gnu.org>
Hello Ludovic,
I was able to compile cgdb natively and cross with the following patch.
Cheers,
Chadwain
* gnu/packages/debug.scm (cgdb)[inputs]: Add gdb, bash-minimal
[arguments]: Add phase to fix hardcoded gdb and sh paths
Add configure flags for cross-compilation
---
gnu/packages/debug.scm | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 24d17d95b0..63e5553484 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -760,9 +760,25 @@ (define-public cgdb
(base32 "1w8ib2vg3pg68d9hh97fw5042c73i9nqavdddc87n9bpscjbaf0d"))))
(build-system gnu-build-system)
(inputs
- (list ncurses readline))
+ (list bash-minimal ncurses readline gdb))
(native-inputs
(list flex texinfo))
+ (arguments
+ `(#:configure-flags
+ (list
+ (string-append "ac_cv_rl_version=" ,(package-version readline))
+ "ac_cv_file__dev_ptmx=no"
+ "ac_cv_file__proc_self_status=no"
+ "ac_cv_func_setpgrp_void=no")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gdb (search-input-file inputs "bin/gdb"))
+ (sh (search-input-file inputs "bin/sh")))
+ (substitute* "lib/util/fork_util.cpp"
+ (("GDB = \"gdb\"") (string-append "GDB = \"" gdb "\"")))
+ (substitute* "cgdb/cgdb.cpp" (("/bin/sh") sh))))))))
(home-page "https://cgdb.github.io")
(synopsis "Console front-end to the GNU debugger")
(description
--
2.35.1
next prev parent reply other threads:[~2022-03-06 6:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-18 5:20 [bug#54052] [PATCH] gnu: cgdb: Add gdb to propagated-inputs Chadwain Holness
2022-02-18 7:56 ` Maxime Devos
2022-02-20 8:11 ` Chadwain Holness
2022-02-20 10:30 ` Maxime Devos
2022-03-03 22:24 ` Ludovic Courtès
2022-03-06 6:24 ` Chadwain Holness [this message]
2022-03-06 21:13 ` bug#54052: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220306062434.17898-1-chadwainholness@gmail.com \
--to=chadwainholness@gmail.com \
--cc=54052@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).