added coreutils toolchain step
This commit is contained in:
52
build/coreutils/build.bash
Normal file
52
build/coreutils/build.bash
Normal 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
|
||||||
7
build/coreutils/package.env
Normal file
7
build/coreutils/package.env
Normal 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
|
||||||
|
|
||||||
Reference in New Issue
Block a user