#1108971 bash: computes wrong PIPESIZE during some cross builds

Package:
src:bash
Source:
src:bash
Submitter:
Helmut Grohne
Date:
2025-07-08 18:53:04 UTC
Severity:
normal
Tags:
#1108971#5
Date:
2025-07-08 18:49:29 UTC
From:
To:
bash has a weired way to compute PIPESIZE. It's a property of the
kernel, but it is not being checked for during ./configure. Instead the
builtins/Makefile.in compiles a builtins/psize.c (using CC_FOR_BUILD)
and runs a builtins/psize.sh to create a pipesize.h #defining PIPESIZE.
It even has a comment noting that this gets the value for the build
architecture while it should be getting it from the host.

Turns out if you cross build bash for hurd on linux you get the wrong
value in such a way that it practically doesn't work. It would be good
if we could preseed this value rather than having it use something bad.

I argue that it really should be a configure time check with a proper
autoconf cache variable allowing overriding and that's exactly what the
attached patch does. What do you think about it?

Of course this is not trixie material.

Helmut and Samuel