Skip to content

Commit

Permalink
sbin/make.cross: switch to the gcc crosstool provided by kernel org
Browse files Browse the repository at this point in the history
Signed-off-by: Yujie Liu <[email protected]>
Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
Yujie-Liu authored and rli9 committed Oct 31, 2023
1 parent 4fa6c99 commit da50082
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions sbin/make.cross
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
}

Expand All @@ -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
}

Expand Down

0 comments on commit da50082

Please sign in to comment.