summaryrefslogtreecommitdiff
path: root/scripts/build/libc
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build/libc')
-rw-r--r--scripts/build/libc/glibc.sh21
-rw-r--r--scripts/build/libc/newlib.sh21
2 files changed, 22 insertions, 20 deletions
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh
index 019dd90..3e2c88e 100644
--- a/scripts/build/libc/glibc.sh
+++ b/scripts/build/libc/glibc.sh
@@ -11,17 +11,16 @@ do_libc_get() {
CT_GetCustom "glibc" "${CT_LIBC_GLIBC_CUSTOM_VERSION}" \
"${CT_LIBC_GLIBC_CUSTOM_LOCATION}"
else
- if echo ${CT_LIBC_VERSION} |grep -q linaro; then
- # Linaro glibc releases come from regular downloads...
- YYMM=`echo ${CT_LIBC_VERSION} |cut -d- -f3 |sed -e 's,^..,,'`
- CT_GetFile "glibc-${CT_LIBC_VERSION}" \
- https://releases.linaro.org/${YYMM}/components/toolchain/glibc-linaro \
- http://cbuild.validation.linaro.org/snapshots
- else
- CT_GetFile "glibc-${CT_LIBC_VERSION}" \
- {http,ftp,https}://ftp.gnu.org/gnu/glibc \
- ftp://{sourceware.org,gcc.gnu.org}/pub/glibc/{releases,snapshots}
- fi
+ case "${CT_LIBC_VERSION}" in
+ linaro-*)
+ CT_GetLinaro "glibc" "${CT_LIBC_VERSION}"
+ ;;
+ *)
+ CT_GetFile "glibc-${CT_LIBC_VERSION}" \
+ {http,ftp,https}://ftp.gnu.org/gnu/glibc \
+ ftp://{sourceware.org,gcc.gnu.org}/pub/glibc/{releases,snapshots}
+ ;;
+ esac
fi
return 0
diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh
index 100dc1a..0c0c2aa 100644
--- a/scripts/build/libc/newlib.sh
+++ b/scripts/build/libc/newlib.sh
@@ -13,15 +13,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
}