Rework on scripts
Also we are now using a cross compiler to create the toolchain because I'm too lazy to do too much scripting lmao.
This commit is contained in:
parent
a9a3077633
commit
b041f9304f
8 changed files with 45 additions and 43 deletions
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
source ./scripts/config.sh
|
||||
. $PWD/scripts/config.sh
|
||||
|
||||
MUSL_TAR=$(ls ./sources/musl-*.tar.* 2>/dev/null | head -n 1 | xargs basename)
|
||||
MUSL_TAR=$(ls "$PROOT"/sources/musl-*.tar.* 2>/dev/null | head -n 1 | xargs basename)
|
||||
if [ -z "$MUSL_TAR" ]; then
|
||||
echo "ERR: No Musl tarball found in sources directory"
|
||||
exit 1
|
||||
|
|
@ -16,7 +16,7 @@ else
|
|||
export CC="cc"
|
||||
fi
|
||||
|
||||
if [ ! -d ./build/"MUSL_SOURCE" ]; then
|
||||
if [ ! -d $PROOT/build/"MUSL_SOURCE" ]; then
|
||||
echo "Extracting Musl tarball to ./build/"
|
||||
tar -xpf ./sources/"$MUSL_TAR" -C ./build
|
||||
else
|
||||
|
|
@ -24,15 +24,15 @@ else
|
|||
fi
|
||||
|
||||
echo "Buliding musl headers"
|
||||
if [ -f "./build/$MUSL_SOURCE" ]; then
|
||||
if [ -f "$PROOT/build/$MUSL_SOURCE" ]; then
|
||||
echo "Musl headers already built, skipping..."
|
||||
exit
|
||||
fi
|
||||
|
||||
cd ./build/"$MUSL_SOURCE"
|
||||
cd $PROOT/build/"$MUSL_SOURCE"
|
||||
|
||||
echo "Installing musl headers..."
|
||||
./configure \
|
||||
--prefix=/
|
||||
|
||||
DESTDIR=../../$CROSS make ARCH=$(uname -m) install-headers
|
||||
DESTDIR=$CROSS make ARCH=$(uname -m) install-headers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue