From 8c43cdb4361f59d9c76e1c94f7686f62aff4971e Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 22 Aug 2012 12:26:10 -0700 Subject: cc/gcc: Add the ability to build gcc from svn I took some of the svn functionality from eglibc. Signed-off-by: Bryan Hundven [yann.morin.1998@free.fr: fix the conditional test in build script] Signed-off-by: "Yann E. MORIN" --- scripts/build/cc/gcc.sh | 65 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 23 deletions(-) (limited to 'scripts/build/cc/gcc.sh') 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 -- cgit v1.2.3