mirror of
https://github.com/hexagonal-sun/moss-kernel.git
synced 2026-04-18 06:08:09 -04:00
Fix bash build on aarch64 host
This commit is contained in:
committed by
Matthew Leach
parent
8038a6c4e2
commit
41814dddbe
@@ -8,17 +8,23 @@ rm -f "$base/build/bin"/*
|
||||
|
||||
pushd "$base/build" &>/dev/null || exit 1
|
||||
|
||||
if [ ! -f "aarch64-linux-musl-cross.tgz" ]
|
||||
if [ "$(uname -m)" == 'aarch64' ]; then
|
||||
MUSL_CC="aarch64-linux-musl-native"
|
||||
else
|
||||
MUSL_CC="aarch64-linux-musl-cross"
|
||||
fi
|
||||
|
||||
if [ ! -f "${MUSL_CC}.tgz" ]
|
||||
then
|
||||
wget https://musl.cc/aarch64-linux-musl-cross.tgz
|
||||
tar -xzf aarch64-linux-musl-cross.tgz
|
||||
wget https://musl.cc/${MUSL_CC}.tgz
|
||||
tar -xzf ${MUSL_CC}.tgz
|
||||
fi
|
||||
|
||||
popd &>/dev/null || exit 1
|
||||
|
||||
build=${build:-$(ls $base/scripts/deps)}
|
||||
|
||||
export PATH="$base/build/aarch64-linux-musl-cross/bin:$PATH"
|
||||
export CC="$base/build/${MUSL_CC}/bin/aarch64-linux-musl-gcc"
|
||||
|
||||
for script in "$base/scripts/deps/"*
|
||||
do
|
||||
|
||||
@@ -4,6 +4,7 @@ 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
|
||||
|
||||
@@ -16,9 +17,10 @@ else
|
||||
fi
|
||||
|
||||
pushd "bash" &>/dev/null || exit 1
|
||||
./configure --without-bash-malloc --enable-static-link --host="aarch64-linux-$stdlib" CC="aarch64-linux-$stdlib-gcc"
|
||||
./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
|
||||
popd &>/dev/null || exit 1
|
||||
|
||||
Reference in New Issue
Block a user