bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Defaults when cross-compiling


From: Chet Ramey
Subject: Re: Defaults when cross-compiling
Date: Tue, 7 Nov 2023 09:30:14 -0500
User-agent: Mozilla Thunderbird

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    chet@case.edu    http://tiswww.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]