added file toolchain build
This commit is contained in:
33
build.sh
33
build.sh
@@ -62,6 +62,9 @@ COREUTILS_URL=https://mirror.ufs.ac.za/gnu/coreutils/coreutils-$COREUTILS_VERSIO
|
||||
DIFFUTILS_VERSION=3.12
|
||||
DIFFUTILS_URL=https://mirror.ufs.ac.za/gnu/diffutils/diffutils-$DIFFUTILS_VERSION.tar.xz
|
||||
|
||||
FILE_VERSION=5.46
|
||||
FILE_URL=https://astron.com/pub/file/file-$FILE_VERSION.tar.gz
|
||||
|
||||
if [ ! -d "$SYSROOT" ]; then
|
||||
mkdir -p "$SYSROOT"/{etc,cross,sources,usr,dev,proc,sys,run}
|
||||
mkdir -p "$SYSROOT"/usr/{bin,sbin,lib,include}
|
||||
@@ -320,8 +323,33 @@ toolchain_diffutils() {
|
||||
cd "$SOURCES" && rm -rf diffutils-$DIFFUTILS_VERSION
|
||||
}
|
||||
|
||||
toolchain_file() {
|
||||
fetch $FILE_URL
|
||||
|
||||
|
||||
cd "$SOURCES" && tar xf file-$FILE_VERSION.tar.gz && cd file-$FILE_VERSION
|
||||
|
||||
mkdir -p build
|
||||
|
||||
pushd build
|
||||
../configure \
|
||||
--disable-bzlib \
|
||||
--disable-libseccomp \
|
||||
--disable-xzlib \
|
||||
--disable-zlib
|
||||
make
|
||||
popd
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--host="$TARGET" \
|
||||
--build=$(./config.guess)
|
||||
|
||||
make FILE_COMPILE="$(pwd)/build/src/file" && make DESTDIR="$SYSROOT" install
|
||||
|
||||
rm "$SYSROOT"/usr/lib/libmagic.la
|
||||
|
||||
cd "$SOURCES" && rm -rf file-$FILE_VERSION
|
||||
}
|
||||
|
||||
#bootstrap_binutils
|
||||
#bootstap_gcc
|
||||
@@ -332,4 +360,5 @@ toolchain_diffutils() {
|
||||
#toolchain_ncurses
|
||||
#toolchain_bash
|
||||
#toolchain_coreutils
|
||||
toolchain_diffutils
|
||||
#toolchain_diffutils
|
||||
toolchain_file
|
||||
Reference in New Issue
Block a user