Subject: [PATCH v3 08/51] gnu: grep: Fix build for the 64bit Hurd.

From: Janneke Nieuwenhuizen <[email-masked]>
Date: Tue, 19 Nov 2024 07:54:38 +0100

* gnu/packages/base.scm (grep)[arguments]: When building for the 64bit Hurd,
add patch-sigsegv.h stage.

Change-Id: I795a591ef8282ee5b760fec43bd4ad849007f602
---
 gnu/packages/base.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 02ef71f20d..010be631d7 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -154,6 +154,13 @@ (define-public grep
                                        (string-append bin "/fgrep"))
                       (("^exec grep")
                        (string-append "exec " bin "/grep"))))))
+              #$@(if (target-hurd64?)
+                     #~((add-after 'unpack 'patch-sigsegv
+                          (lambda _
+                            ;; Stack overflow recovery does not compile
+                            (substitute* "lib/sigsegv.in.h"
+                              (("__GNU__") "__XGNU__")))))
+                     #~())
               #$@(if (system-hurd?)
                      #~((add-before 'check 'skip-test
                           (lambda _
-- 
2.46.0