added patch toolchain build

This commit is contained in:
ag-tsotetsi
2026-02-20 12:48:24 +02:00
parent 1944aae285
commit 82b54c031d

View File

@@ -80,6 +80,9 @@ GZIP_URL=https://mirror.ufs.ac.za/gnu/gzip/gzip-$GZIP_VERSION.tar.xz
MAKE_VERSION=4.4.1 MAKE_VERSION=4.4.1
MAKE_URL=https://mirror.ufs.ac.za/gnu/make/make-$MAKE_VERSION.tar.gz MAKE_URL=https://mirror.ufs.ac.za/gnu/make/make-$MAKE_VERSION.tar.gz
PATCH_VERSION=2.8
PATCH_URL=https://mirror.ufs.ac.za/gnu/patch/patch-$PATCH_VERSION.tar.xz
if [ ! -d "$SYSROOT" ]; then if [ ! -d "$SYSROOT" ]; then
mkdir -p "$SYSROOT"/{etc,cross,sources,usr,dev,proc,sys,run} mkdir -p "$SYSROOT"/{etc,cross,sources,usr,dev,proc,sys,run}
mkdir -p "$SYSROOT"/usr/{bin,sbin,lib,include} mkdir -p "$SYSROOT"/usr/{bin,sbin,lib,include}
@@ -443,6 +446,21 @@ toolchain_make() {
cd "$SOURCES" && rm -rf make-$MAKE_VERSION cd "$SOURCES" && rm -rf make-$MAKE_VERSION
} }
toolchain_patch() {
fetch $PATCH_URL
cd "$SOURCES" && tar xf patch-$PATCH_VERSION.tar.xz && cd patch-$PATCH_VERSION
./configure \
--prefix=/usr \
--host=$TARGET \
--build=$(build-aux/config.guess)
make && make DESTDIR="$SYSROOT" install
cd "$SOURCES" && rm -rf patch-$PATCH_VERSION
}
#bootstrap_binutils #bootstrap_binutils
#bootstap_gcc #bootstap_gcc
#bootstap_linux #bootstap_linux
@@ -457,5 +475,6 @@ toolchain_make() {
#toolchain_findutils #toolchain_findutils
#toolchain_gawk #toolchain_gawk
#toolchain_grep #toolchain_grep
toolchain_gzip #toolchain_gzip
#toolchain_make #toolchain_make
toolchain_patch