diff options
author | Yann E. MORIN" <yann.morin.1998@free.fr> | 2012-08-22 12:26:10 -0700 |
---|---|---|
committer | Bryan Hundven <bryanhundven@gmail.com> | 2012-08-22 12:26:10 -0700 |
commit | 8c43cdb4361f59d9c76e1c94f7686f62aff4971e (patch) | |
tree | d85b75a34548e820aa3582873d33b71dbdea4585 /scripts/build/cc | |
parent | 946e5d8535cf5ec0b69647f9d0ab557808e9b38b (diff) | |
download | crosstool-ng-8c43cdb4361f59d9c76e1c94f7686f62aff4971e.tar.gz crosstool-ng-8c43cdb4361f59d9c76e1c94f7686f62aff4971e.tar.bz2 crosstool-ng-8c43cdb4361f59d9c76e1c94f7686f62aff4971e.zip |
cc/gcc: Add the ability to build gcc from svn
I took some of the svn functionality from eglibc.
Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
[yann.morin.1998@free.fr: fix the conditional test in build script]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Diffstat (limited to 'scripts/build/cc')
-rw-r--r-- | scripts/build/cc/gcc.sh | 65 |
1 files changed, 42 insertions, 23 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index 7b4101c1..56f4c9fd 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 |