On 11/6/23 10:39 PM, Michael T. Kloos wrote:
I was trying to cross-compile bash for musl libc.  The configure script reports:

checking for working sbrk... configure: WARNING: cannot check working sbrk if 
cross-compiling
yes

In this case, the bash configure assumes that sbrk is present and working,
since that's true 90+% of the time.

However, I don't believe musl libc supports sbrk.  However, autoconf seems to 
default
to assuming yes and sets the HAVE_SBRK definition.  Bash then crashes on 
xmalloc failure.

If sbrk doesn't work on the target platform, configure --without-bash-malloc
to avoid using it.

It's interesting that musl supports brk but not sbrk, since you can always
implement sbrk using brk if you know the current break.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/


Reply via email to