summaryrefslogtreecommitdiff
path: root/scripts/build/cc
diff options
context:
space:
mode:
authorBryan Hundven <bryanhundven@gmail.com>2014-12-08 23:03:08 (GMT)
committerBryan Hundven <bryanhundven@gmail.com>2014-12-08 23:03:08 (GMT)
commit79422633cf2d0282ed2d637d2ba237cc3f4e6a8e (patch)
treeab8bf93a3d7e9217bb21fe8c9cd94b083653085e /scripts/build/cc
parent098c87e98aa0c4b07a632173ddfd72c93df49aad (diff)
scripts: Update download locations
This change updates the download locations to default to the official download site. For gcc and gdb, also separate out the linaro download locations so that if you are downloading the linaro variant, it skips trying to download from the official gcc mirror. This commit closes #3 Signed-off-by: Bryan Hundven <bryanhundven@gmail.com> Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'scripts/build/cc')
-rw-r--r--scripts/build/cc/gcc.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 9dbc41e..ff82421 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -19,16 +19,17 @@ do_cc_get() {
|sed -r -e 's/-.*//;' \
)"
- # Ah! gcc folks are kind of 'different': they store the tarballs in
- # subdirectories of the same name!
- # Arrgghh! Some of those versions does not follow this convention:
- # gcc-3.3.3 lives in releases/gcc-3.3.3, while gcc-2.95.* isn't in a
- # subdirectory!
- CT_GetFile "gcc-${CT_CC_VERSION}" \
- {ftp,http}://ftp.gnu.org/gnu/gcc{,{,/releases}/gcc-${CT_CC_VERSION}} \
- ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-${CT_CC_VERSION} \
- ftp://ftp.uvsq.fr/pub/gcc/snapshots/${CT_CC_VERSION} \
+ # 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"" ]; then
+ CT_GetFile "gcc-${CT_CC_VERSION}" \
+ ftp://{gcc.gnu.org,sourceware.org}/pub/gcc/releases/gcc-${CT_CC_VERSION} \
+ {http,ftp,https}://ftp.gnu.org/gnu/gcc/gcc-${CT_CC_VERSION} \
+ else
+ CT_GetFile "gcc-${CT_CC_VERSION}" \
"${linaro_base_url}/${linaro_series}/${linaro_version}/+download"
+ fi
fi # ! custom location
# Starting with GCC 4.3, ecj is used for Java, and will only be