mirror of
https://github.com/hexagonal-sun/moss-kernel.git
synced 2025-12-23 22:47:55 -05:00
'bool' has become a reserved keyword in c23. If gcc is modern enough that this is the default standard, it results in an error. Default to c99 for the host compiler to fix the problem. Patch suggested by: @dec-mcgraw Fixes: #43
24 lines
600 B
Bash
Executable File
24 lines
600 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
bash_repo="${bash_repo:-https://git.savannah.gnu.org/git/bash.git}"
|
|
bash_tag="${bash_tag:-bash-5.3}"
|
|
stdlib="${stdlib:-musl}"
|
|
CC="${CC:-aarch64-linux-$stdlib-gcc}"
|
|
|
|
pushd "build" &>/dev/null || exit 1
|
|
|
|
if [ ! -d "bash-5.3" ]; then
|
|
wget https://ftp.gnu.org/gnu/bash/bash-5.3.tar.gz
|
|
tar xzf bash-5.3.tar.gz
|
|
fi
|
|
|
|
pushd "bash-5.3" &>/dev/null || exit 1
|
|
CFLAGS_FOR_BUILD="-std=c99" ./configure --without-bash-malloc --enable-static-link --host="aarch64-linux-$stdlib"
|
|
make clean
|
|
make
|
|
mv bash ../bin/bash
|
|
popd &>/dev/null || exit 1
|
|
|
|
popd &>/dev/null || exit 1
|