1.1 --- a/scripts/build/cc/gcc.sh Wed Aug 22 18:08:39 2012 +0200
1.2 +++ b/scripts/build/cc/gcc.sh Wed Oct 03 15:59:22 2012 +1000
1.3 @@ -4,30 +4,49 @@
1.4
1.5 # Download gcc
1.6 do_cc_get() {
1.7 - local linaro_version
1.8 - local linaro_series
1.9 - local linaro_base_url="http://launchpad.net/gcc-linaro"
1.10 + if [ -n "${CT_CC_V_SVN}" ]; then
1.11 + # Get gcc from SVN!
1.12 + local svn_base
1.13
1.14 + if [ "${CT_GCC_HTTP}" = "y" ]; then
1.15 + svn_base="http://gcc.gnu.org/svn/gcc"
1.16 + else
1.17 + svn_base="svn://gcc.gnu.org/svn/gcc"
1.18 + fi
1.19 +
1.20 + svn_base+="/${CT_GCC_BRANCH:-trunk}"
1.21
1.22 - # Account for the Linaro versioning
1.23 - linaro_version="$( echo "${CT_CC_VERSION}" \
1.24 - |sed -r -e 's/^linaro-//;' \
1.25 - )"
1.26 - linaro_series="$( echo "${linaro_version}" \
1.27 - |sed -r -e 's/-.*//;' \
1.28 - )"
1.29 + CT_CC_VERSION="${CT_GCC_BRANCH//\//_}"
1.30
1.31 - # Ah! gcc folks are kind of 'different': they store the tarballs in
1.32 - # subdirectories of the same name!
1.33 - # Arrgghh! Some of those versions does not follow this convention:
1.34 - # gcc-3.3.3 lives in releases/gcc-3.3.3, while gcc-2.95.* isn't in a
1.35 - # subdirectory!
1.36 - CT_GetFile "gcc-${CT_CC_VERSION}" \
1.37 - {ftp,http}://ftp.gnu.org/gnu/gcc{,{,/releases}/gcc-${CT_CC_VERSION}} \
1.38 - ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-${CT_CC_VERSION} \
1.39 - ftp://ftp.uvsq.fr/pub/gcc/snapshots/${CT_CC_VERSION} \
1.40 - "${linaro_base_url}/${linaro_series}/${linaro_version}/+download"
1.41 + CT_GetSVN "gcc-${CT_CC_VERSION}" \
1.42 + "${svn_base}/" \
1.43 + "${CT_GCC_REVISION:-HEAD}"
1.44 + else
1.45 + local linaro_version
1.46 + local linaro_series
1.47 + local linaro_base_url="http://launchpad.net/gcc-linaro"
1.48
1.49 +
1.50 + # Account for the Linaro versioning
1.51 + linaro_version="$( echo "${CT_CC_VERSION}" \
1.52 + |sed -r -e 's/^linaro-//;' \
1.53 + )"
1.54 + linaro_series="$( echo "${linaro_version}" \
1.55 + |sed -r -e 's/-.*//;' \
1.56 + )"
1.57 +
1.58 + # Ah! gcc folks are kind of 'different': they store the tarballs in
1.59 + # subdirectories of the same name!
1.60 + # Arrgghh! Some of those versions does not follow this convention:
1.61 + # gcc-3.3.3 lives in releases/gcc-3.3.3, while gcc-2.95.* isn't in a
1.62 + # subdirectory!
1.63 + CT_GetFile "gcc-${CT_CC_VERSION}" \
1.64 + {ftp,http}://ftp.gnu.org/gnu/gcc{,{,/releases}/gcc-${CT_CC_VERSION}} \
1.65 + ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-${CT_CC_VERSION} \
1.66 + ftp://ftp.uvsq.fr/pub/gcc/snapshots/${CT_CC_VERSION} \
1.67 + "${linaro_base_url}/${linaro_series}/${linaro_version}/+download"
1.68 +
1.69 + fi # -n ${CT_CC_V_SVN}
1.70 # Starting with GCC 4.3, ecj is used for Java, and will only be
1.71 # built if the configure script finds ecj.jar at the top of the
1.72 # GCC source tree, which will not be there unless we get it and