summaryrefslogtreecommitdiff
path: root/scripts/build/libc/newlib.sh
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-01-13 17:53:27 (GMT)
committerGitHub <noreply@github.com>2017-01-13 17:53:27 (GMT)
commitcbb045ab333df1047a6a9851c19c4b0b61442011 (patch)
tree0e886b4bcf6f54c9cb3b273c9ac511585f3959f6 /scripts/build/libc/newlib.sh
parente282fd5551b35cba0c09b92efbe6fa17af7f80a8 (diff)
parent9f5a92a783eb33430a3c8e5518e7e1c723fe3a15 (diff)
Merge pull request #525 from stilor/linaro-download-location
Fix Linaro download locations
Diffstat (limited to 'scripts/build/libc/newlib.sh')
-rw-r--r--scripts/build/libc/newlib.sh21
1 files changed, 12 insertions, 9 deletions
diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh
index 0a87581..06e88e4 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
}