Re: [PATCH] bash-5.3-rc1 FTBFS when cross compiling with gcc-15
From:
Chet Ramey
Subject:
Re: [PATCH] bash-5.3-rc1 FTBFS when cross compiling with gcc-15
Date:
Thu, 22 May 2025 09:12:19 -0400
User-agent:
Mozilla Thunderbird
On 5/21/25 5:02 PM, Bruce Dubbs wrote:
In linuxfromscratch we do a preliminary build of bash in order to
run it later in a chroot environment without any dependencies from the host
system:
./configure --prefix=/usr \
--build=x86_64-pc-linux-gnu \
--host=x86_64-lfs-linux-gnu \
--without-bash-malloc
When we do this, the build runs:
gcc -c -DHAVE_CONFIG_H -DSHELL -I. -I.. -I.. -I../include -I../lib -I. \
-Wno-parentheses -Wno-format-security -DDEBUG -g -DCROSS_COMPILING \
mkbuiltins.c
Looking at ./builtins/mkbuiltins.c we have:
#if !defined (CROSS_COMPILING)
# include <config.h>
...
#include "../bashansi.h"
Yes, cross-compiling means that config.h is for the target system, not the
build system. The build system assumes a very conservative C90/XPG6
compilation environment.
Bash-5.3 introduces a buildconf.h file for this situation; I'll see if I
can fix this there and have mkbuiltins.c include it.
--
``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/