[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] aclocal.m4: Fix BASH_FUNC_SBRK when cross-compiling for
From: |
Chet Ramey |
Subject: |
Re: [PATCH 2/3] aclocal.m4: Fix BASH_FUNC_SBRK when cross-compiling for FreeBSD/RISC-V |
Date: |
Mon, 29 Jun 2020 10:52:33 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 |
On 6/27/20 4:06 PM, Jessica Clarke wrote:
> FreeBSD unconditionally provides a prototype for sbrk(2), but on recent
> ports (AArch64 and RISC-V) it does not provide the deprecated symbol.
> This means that, when cross-compiling, we currently only get to use
> AC_CHECK_FUNCS_ONCE, and so believe sbrk(2) to be available. Instead,
> use AC_TRY_LINK so we can detect this case when cross-compiling. Also,
> only define HAVE_SBRK when our tests pass, since xmalloc.c checks
> whether it's defined, not its value. This likely meant the case where
> sbrk(2) was available but broken did not in fact do the right thing.
Thanks for the report and fix.
Chet
--
``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/