diff options
author | Alexey Neyman <stilor@att.net> | 2017-01-11 22:20:46 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2017-01-12 23:00:41 -0800 |
commit | 9f5a92a783eb33430a3c8e5518e7e1c723fe3a15 (patch) | |
tree | bc4abff0bedeb7155996c89a41656fd406823149 /scripts/build/cc | |
parent | 5e0f715ea7d032207d20593e43b02c1a1d7cd759 (diff) | |
download | crosstool-ng-9f5a92a783eb33430a3c8e5518e7e1c723fe3a15.tar.gz crosstool-ng-9f5a92a783eb33430a3c8e5518e7e1c723fe3a15.tar.bz2 crosstool-ng-9f5a92a783eb33430a3c8e5518e7e1c723fe3a15.zip |
Unify fetching Linaro components.
Add CT_GetLinaro, use it from gcc/binutils/gdb/glibc/newlib.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/build/cc')
-rw-r--r-- | scripts/build/cc/100-gcc.sh | 36 |
1 files changed, 12 insertions, 24 deletions
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 |