diff mbox series

[bug#74290,09/31] gnu: grep: Fix build for the 64bit Hurd.

Message ID ae7a6ed0238a5a9f669d05335f7c9547ec368a7c.1731232753.git.janneke@gnu.org
State New
Headers show
Series Add support for x86_64-gnu, aka the 64bit Hurd. | expand

Commit Message

Janneke Nieuwenhuizen Nov. 10, 2024, 10:38 a.m. UTC
* 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 mbox series

Patch

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 _