From f1d823ef8c17b2bca8753ae0d55fbf87e3a2d013 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Thu, 17 Mar 2022 03:55:29 +0000 Subject: [PATCH] build.sh: add support for GCC versions > 5.4.0 starting with GCC 5.5.0, releases were uploaded as tar.xz instead of tar.bz2. --- build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 0752361..72e80f9 100755 --- a/build.sh +++ b/build.sh @@ -59,7 +59,11 @@ buildinstall 1 $BINUTILS_DIR --target=$TRIPLE --disable-werror $SYSROOT_FLAGS \ # gcc 1 if [ -z $GCC_URL ]; then - fetchextract gcc http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/ gcc-$GCC_VERSION .tar.bz2 + gcc_ext=bz2 + if test $(printf "%s\n" "$GCC_VERSION" | sed 's/\.//g') -gt 540 ; then + gcc_ext=xz + fi + fetchextract gcc http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VERSION/ gcc-$GCC_VERSION .tar.${gcc_ext} else fetchextract gcc "$GCC_URL" if [ -e $GCC_EXTRACT_DIR ]; then -- 2.11.4.GIT