From da5008256521319ac96a9beaf9d4e87caf65f1ab Mon Sep 17 00:00:00 2001 From: Yujie Liu Date: Tue, 31 Oct 2023 17:42:56 +0800 Subject: [PATCH] sbin/make.cross: switch to the gcc crosstool provided by kernel org Signed-off-by: Yujie Liu Signed-off-by: Philip Li --- sbin/make.cross | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sbin/make.cross b/sbin/make.cross index 97c5caaa1..e7f8c09c2 100755 --- a/sbin/make.cross +++ b/sbin/make.cross @@ -88,6 +88,15 @@ download_extract() tar Jxf $dir/$file -C $COMPILER_INSTALL_PATH } +show_url_hint() +{ + echo "Please set new URL env variable and rerun" + echo " * crosstool provided by kernel org:" + echo " export URL=https://cdn.kernel.org/pub/tools/crosstool/files/bin/x86_64" + echo " * crosstool provided by 0-Day CI:" + echo " export URL=https://download.01.org/0day-ci/cross-package" +} + install_crosstool_clang() { local URL='https://download.01.org/0day-ci/cross-package' @@ -101,12 +110,12 @@ install_crosstool_clang() install_crosstool_gcc() { - [[ $URL ]] || local URL='https://download.01.org/0day-ci/cross-package' + [[ $URL ]] || local URL='https://cdn.kernel.org/pub/tools/crosstool/files/bin/x86_64' local list=/tmp/0day-ci-crosstool-files timeout 3m lftp -c "open $URL/ && find -d 3" | sort -V > $list || { echo "Cannot get list from $URL" - echo "Please set new url, e.g. export URL=https://cdn.kernel.org/pub/tools/crosstool/files/bin/x86_64" + show_url_hint return 1 } @@ -125,7 +134,7 @@ install_crosstool_gcc() fi [[ $file ]] || { echo "Cannot find $gcc_arch_pattern under $URL check $list" - echo "Please set new url, e.g. export URL=https://cdn.kernel.org/pub/tools/crosstool/files/bin/x86_64" + show_url_hint return 1 }