From 9f5a92a783eb33430a3c8e5518e7e1c723fe3a15 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 11 Jan 2017 22:20:46 -0800 Subject: Unify fetching Linaro components. Add CT_GetLinaro, use it from gcc/binutils/gdb/glibc/newlib. Signed-off-by: Alexey Neyman --- scripts/build/libc/newlib.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'scripts/build/libc/newlib.sh') diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh index 0a87581e..06e88e4d 100644 --- a/scripts/build/libc/newlib.sh +++ b/scripts/build/libc/newlib.sh @@ -17,15 +17,18 @@ do_libc_get() { CT_GetCustom "newlib" "${CT_LIBC_NEWLIB_CUSTOM_VERSION}" \ "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}" else # ! custom location - if echo ${CT_LIBC_VERSION} |grep -q linaro; then - YYMM=`echo ${CT_LIBC_VERSION} |cut -d- -f3 |sed -e 's,^..,,'` - CT_GetFile "newlib-${CT_LIBC_VERSION}" ${libc_src} \ - https://releases.linaro.org/${YYMM}/components/toolchain/newlib-linaro \ - http://cbuild.validation.linaro.org/snapshots - else - CT_GetFile "newlib-${CT_LIBC_VERSION}" ${libc_src} \ - http://mirrors.kernel.org/sources.redhat.com/newlib - fi + case "${CT_LIBC_VERSION}" in + linaro-*) + CT_GetLinaro "newlib" "${CT_LIBC_VERSION}" + ;; + *) + # kernel.org mirror is outdated, keep last as a fallback + CT_GetFile "newlib-${CT_LIBC_VERSION}" \ + ftp://sourceware.org/pub/newlib \ + http://mirrors.kernel.org/sourceware/newlib \ + http://mirrors.kernel.org/sources.redhat.com/newlib + ;; + esac fi # ! custom location } -- cgit v1.2.3