diff --git a/build.sh b/build.sh index 9db5ca2..d8d7d2e 100755 --- a/build.sh +++ b/build.sh @@ -68,6 +68,9 @@ FILE_URL=https://astron.com/pub/file/file-$FILE_VERSION.tar.gz FINDUTILS_VERSION=4.10.0 FINDUTILS_URL=https://mirror.ufs.ac.za/gnu/findutils/findutils-$FINDUTILS_VERSION.tar.xz +GAWK_VERSION=5.3.2 +GAWK_URL=https://mirror.ufs.ac.za/gnu/gawk/gawk-$GAWK_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} @@ -370,6 +373,23 @@ toolchain_findutils() { cd "$SOURCES" && rm -rf findutils-$FINDUTILS_VERSION } +toolchain_gawk() { + fetch $GAWK_URL + + cd "$SOURCES" && tar xf gawk-$GAWK_VERSION.tar.xz && cd gawk-$GAWK_VERSION + + sed -i 's/extras//' Makefile.in + + ./configure \ + --prefix=/usr \ + --host=$TARGET \ + --build=$(build-aux/config.guess) + + make && make DESTDIR="$SYSROOT" install + + cd "$SOURCES" && rm -rf gawk-$GAWK_VERSION +} + #bootstrap_binutils #bootstap_gcc #bootstap_linux @@ -381,4 +401,5 @@ toolchain_findutils() { #toolchain_coreutils #toolchain_diffutils #toolchain_file -toolchain_findutils \ No newline at end of file +#toolchain_findutils +toolchain_gawk \ No newline at end of file