From 82b54c031d6adbb55b85de76224ac0c36b3468b3 Mon Sep 17 00:00:00 2001 From: ag-tsotetsi Date: Fri, 20 Feb 2026 12:48:24 +0200 Subject: [PATCH] added patch toolchain build --- build.sh | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 0f2cec5..ab8236c 100755 --- a/build.sh +++ b/build.sh @@ -80,6 +80,9 @@ GZIP_URL=https://mirror.ufs.ac.za/gnu/gzip/gzip-$GZIP_VERSION.tar.xz MAKE_VERSION=4.4.1 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 mkdir -p "$SYSROOT"/{etc,cross,sources,usr,dev,proc,sys,run} mkdir -p "$SYSROOT"/usr/{bin,sbin,lib,include} @@ -443,6 +446,21 @@ toolchain_make() { 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 #bootstap_gcc #bootstap_linux @@ -457,5 +475,6 @@ toolchain_make() { #toolchain_findutils #toolchain_gawk #toolchain_grep -toolchain_gzip -#toolchain_make \ No newline at end of file +#toolchain_gzip +#toolchain_make +toolchain_patch \ No newline at end of file