On 5/21/25 5:02 PM, Bruce Dubbs wrote:
In linuxfromscratch we do a preliminary build of bash in order torun 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 c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature