From b1fd9531149b94a7e7cdabc67b08ea6a47b03d3d Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Sun, 21 Nov 2021 22:24:24 +0100 Subject: gnu: gdb: Build fix for the Hurd. This allows (cross-)building gdb-minimal for the Hurd. * gnu/packages/patches/gdb-fix-gnu-nat-build.patch: New file, taken from upstream. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/web.scm (gdb)[inputs]: When building for the Hurd, add it. [arguments]: When building for the Hurd, apply it. --- gnu/packages/gdb.scm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'gnu/packages/gdb.scm') diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm index 9036d496a3..aa9e479e46 100644 --- a/gnu/packages/gdb.scm +++ b/gnu/packages/gdb.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2015, 2016, 2019, 2021 Efraim Flashner ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2020 Vincent Legoll -;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2021 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020, 2021 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. @@ -71,6 +71,12 @@ "gdbsupport/pathstuff.cc") (("\"/bin/sh\"") (format #f "~s" sh)))))) + ,@(if (hurd-target?) + '((add-after 'unpack 'patch-gdb/hurd + (lambda* (#:key inputs #:allow-other-keys) + (let ((patch (assoc-ref inputs "hurd-build.patch"))) + (invoke "patch" "-p1" "--force" "-i" patch))))) + '()) (add-after 'configure 'post-configure (lambda _ (for-each patch-makefile-SHELL @@ -111,7 +117,11 @@ ("libxml2" ,libxml2) ;; The Hurd needs -lshouldbeinlibc. - ,@(if (hurd-target?) `(("hurd" ,hurd)) '()))) + ,@(if (hurd-target?) + `(("hurd" ,hurd) + ("hurd-build.patch" + ,(search-patch "gdb-fix-gnu-nat-build.patch"))) + '()))) (native-inputs `(("texinfo" ,texinfo) ("dejagnu" ,dejagnu) -- cgit v1.2.3