summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/cc/gcc.sh65
1 files changed, 42 insertions, 23 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 7b4101c..56f4c9f 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -4,30 +4,49 @@
# Download gcc
do_cc_get() {
- local linaro_version
- local linaro_series
- local linaro_base_url="http://launchpad.net/gcc-linaro"
-
-
- # Account for the Linaro versioning
- linaro_version="$( echo "${CT_CC_VERSION}" \
- |sed -r -e 's/^linaro-//;' \
- )"
- linaro_series="$( echo "${linaro_version}" \
- |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} \
- "${linaro_base_url}/${linaro_series}/${linaro_version}/+download"
+ if [ -n "${CT_CC_V_SVN}" ]; then
+ # Get gcc from SVN!
+ local svn_base
+ if [ "${CT_GCC_HTTP}" = "y" ]; then
+ svn_base="http://gcc.gnu.org/svn/gcc"
+ else
+ svn_base="svn://gcc.gnu.org/svn/gcc"
+ fi
+
+ svn_base+="/${CT_GCC_BRANCH:-trunk}"
+
+ CT_CC_VERSION="${CT_GCC_BRANCH//\//_}"
+
+ CT_GetSVN "gcc-${CT_CC_VERSION}" \
+ "${svn_base}/" \
+ "${CT_GCC_REVISION:-HEAD}"
+ else
+ local linaro_version
+ local linaro_series
+ local linaro_base_url="http://launchpad.net/gcc-linaro"
+
+
+ # Account for the Linaro versioning
+ linaro_version="$( echo "${CT_CC_VERSION}" \
+ |sed -r -e 's/^linaro-//;' \
+ )"
+ linaro_series="$( echo "${linaro_version}" \
+ |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} \
+ "${linaro_base_url}/${linaro_series}/${linaro_version}/+download"
+
+ fi # -n ${CT_CC_V_SVN}
# 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
# GCC source tree, which will not be there unless we get it and