added coreutils toolchain step

This commit is contained in:
ag-tsotetsi
2026-02-08 11:36:59 +02:00
parent 2be0dc5c18
commit 5d8a1034da
2 changed files with 59 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
. "$PROJECTDIR/build/coreutils/package.env"
fetch $COREUTILS_URL
cd "$SOURCES" && tar xf coreutils-$COREUTILS_VERSION.tar.xz && cd coreutils-$COREUTILS_VERSION
bootstrap() {
echo bootstrap
}
toolchain() {
sed -r '/_GL_EXTERN_C/s/w?memchr|bsearch/(&)/' -i $(find -name \*.in.h)
./configure \
--prefix=/usr \
--host=$TARGET \
--build=$(build-aux/config.guess) \
--enable-install-program=hostname \
--enable-no-install-program=kill,uptime > /dev/null
make > /dev/null && make DESTDIR="$SYSROOT" install > /dev/null
mv "$SYSROOT/usr/bin/chroot" "$SYSROOT/usr/sbin"
}
setup() {
echo setup
}
final() {
echo final
}
case $1 in
bootstrap)
bootstrap
;;
toolchain)
toolchain
;;
setup)
setup
;;
final)
final
;;
esac
cd "$SOURCES" && rm -rf coreutils-$COREUTILS_VERSION

View File

@@ -0,0 +1,7 @@
export COREUTILS_VERSION=9.9
IFS='.' read -r COREUTILS_VERSION_MAJOR COREUTILS_VERSION_MINOR <<< $COREUTILS_VERSION
export COREUTILS_VERSION_MAJOR COREUTILS_VERSION_MINOR
export COREUTILS_URL=https://mirror.ufs.ac.za/gnu/coreutils/coreutils-$COREUTILS_VERSION.tar.xz