From 8046fb4da06c197b7d62af8823f25192183dfdf2 Mon Sep 17 00:00:00 2001 From: ag-tsotetsi Date: Fri, 20 Feb 2026 12:57:13 +0200 Subject: [PATCH] added xz toolchain build --- build.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index a43411b..42dc3d0 100755 --- a/build.sh +++ b/build.sh @@ -89,6 +89,9 @@ SED_URL=https://mirror.ufs.ac.za/gnu/sed/sed-$SED_VERSION.tar.xz TAR_VERSION=1.35 TAR_URL=https://mirror.ufs.ac.za/gnu/tar/tar-$TAR_VERSION.tar.xz +XZ_VERSION=5.8.2 +XZ_URL=https://github.com//tukaani-project/xz/releases/download/v$XZ_VERSION/xz-$XZ_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} @@ -497,6 +500,24 @@ toolchain_tar() { cd "$SOURCES" && rm -rf tar-$TAR_VERSION } +toolchain_xz() { + fetch $XZ_URL + + cd "$SOURCES" && tar xf xz-$XZ_VERSION.tar.xz && cd xz-$XZ_VERSION + + ./configure \ + --prefix=/usr \ + --host=$TARGET \ + --build=$(build-aux/config.guess) \ + --disable-static + + make && make DESTDIR="$SYSROOT" install + + rm "$SYSROOT"/usr/lib/liblzma.la + + cd "$SOURCES" && rm -rf xz-$XZ_VERSION +} + #bootstrap_binutils #bootstap_gcc #bootstap_linux @@ -515,4 +536,5 @@ toolchain_tar() { #toolchain_make #toolchain_patch #toolchain_sed -toolchain_tar \ No newline at end of file +#toolchain_tar +toolchain_xz \ No newline at end of file