summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorJanneke Nieuwenhuizen <[email protected]>2024-11-16 20:21:59 +0100
committerJanneke Nieuwenhuizen <[email protected]>2024-12-03 08:33:13 +0100
commita56e8f0a877b792f0da114e4fbc3fcee9598e11a (patch)
tree8d1af36129b5829f57c732e0f6af8054bf8ecc31 /gnu
parenta9005279d0608f956c95c6852ace27ae69c57201 (diff)
gnu: bash: Avoid hang when cross-built for the Hurd.
For example, without this patch bash hangs while configuring diffutils. Reproducer: cat >x.awk <<EOF x... repeat 16384 (the actual pipe size) times EOF * gnu/packages/bash.scm (bash): When cross-building for the Hurd, add new "create-pipesize.h" stage. Change-Id: I02c1dcf2d63849626ba3448cd52766db822dc77c
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/bash.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 56918d79bd..642a405985 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -175,6 +175,20 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
#:phases
(modify-phases %standard-phases
+ ,@(if (and (target-hurd?) (not (system-hurd?)))
+ `((add-after 'configure 'create-pipesize.h
+ ;; The Bash Makefile mentions how PIPESIZE calculation is
+ ;; "technically wrong" when cross-compiling, and offers no
+ ;; way to override it. On the 64bit Hurd, it can make
+ ;; bash hang.
+ (lambda _
+ (with-directory-excursion "builtins"
+ (with-output-to-file "psize.aux"
+ (lambda _ (display "dummy to pacify make\n")))
+ (with-output-to-file "pipesize.h"
+ (lambda _ (display "#define PIPESIZE 16384\n")))))))
+ '())
+
(add-after 'install 'install-sh-symlink
(lambda* (#:key outputs #:allow-other-keys)
;; Add a `sh' -> `bash' link.