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/cc/100-gcc.sh | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) (limited to 'scripts/build/cc') diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh index 947d4afd..8fd850be 100644 --- a/scripts/build/cc/100-gcc.sh +++ b/scripts/build/cc/100-gcc.sh @@ -11,30 +11,18 @@ do_gcc_get() { CT_GetCustom "gcc" "${CT_CC_GCC_CUSTOM_VERSION}" \ "${CT_CC_GCC_CUSTOM_LOCATION}" else - # Account for the Linaro versioning - linaro_version="$( echo "${CT_CC_GCC_VERSION}" \ - |sed -r -e 's/^linaro-//;' \ - )" - linaro_series="$( echo "${linaro_version}" \ - |sed -r -e 's/-.*//;' \ - )" - - # The official gcc hosts put gcc under a gcc/release/ directory, - # whereas the mirrors put it in the gcc/ directory. - # Also, Split out linaro mirrors, so that downloads happen faster. - if [ x"${linaro_version}" = x"${CT_CC_GCC_VERSION}" ]; then - CT_GetFile "gcc-${CT_CC_GCC_VERSION}" \ - {http,ftp,https}://ftp.gnu.org/gnu/gcc/gcc-${CT_CC_GCC_VERSION} \ - ftp://{gcc.gnu.org,sourceware.org}/pub/gcc/releases/gcc-${CT_CC_GCC_VERSION} - else - YYMM=`echo ${CT_CC_GCC_VERSION} |cut -d- -f3 |sed -e 's,^..,,'` - CT_GetFile "gcc-${CT_CC_GCC_VERSION}" \ - "https://releases.linaro.org/components/toolchain/gcc-linaro/${linaro_version}" \ - "https://releases.linaro.org/${YYMM}/components/toolchain/gcc-linaro/${linaro_series}" \ - "http://launchpad.net/gcc-linaro/${linaro_series}/${linaro_version}/+download" \ - http://cbuild.validation.linaro.org/snapshots - fi - + case "${CT_CC_GCC_VERSION}" in + linaro-*) + CT_GetLinaro "gcc" "${CT_CC_GCC_VERSION}" + ;; + *) + # The official gcc hosts put gcc under a gcc/release/ directory, + # whereas the mirrors put it in the gcc/ directory. + CT_GetFile "gcc-${CT_CC_GCC_VERSION}" \ + {http,ftp,https}://ftp.gnu.org/gnu/gcc/gcc-${CT_CC_GCC_VERSION} \ + ftp://{gcc.gnu.org,sourceware.org}/pub/gcc/releases/gcc-${CT_CC_GCC_VERSION} + ;; + esac fi # ! custom location # Starting with GCC 4.3, ecj is used for Java, and will only be # built if the configure script finds ecj.jar at the top of the -- cgit v1.2.3