1.1 --- a/config/cc/gcc.in Sun Aug 26 10:35:20 2012 +0100
1.2 +++ b/config/cc/gcc.in Wed Aug 22 12:26:10 2012 -0700
1.3 @@ -33,6 +33,14 @@
1.4 choice
1.5 bool
1.6 prompt "gcc version"
1.7 +
1.8 +config CC_V_SVN
1.9 + bool
1.10 + prompt "gcc from svn"
1.11 + depends on EXPERIMENTAL
1.12 + depends on CONFIGURE_has_svn
1.13 + select CC_GCC_latest
1.14 +
1.15 # Don't remove next line
1.16 # CT_INSERT_VERSION_BELOW
1.17
1.18 @@ -228,6 +236,62 @@
1.19
1.20 endchoice
1.21
1.22 +if CC_V_SVN
1.23 +
1.24 +config GCC_BRANCH
1.25 + string
1.26 + prompt "Branch or tag to use"
1.27 + default "trunk"
1.28 + help
1.29 + Enter the branch of gcc to use. Default is trunk
1.30 +
1.31 + A few examples might be:
1.32 + * trunk
1.33 + * branches/gcc-4_7-branch
1.34 + * branches/gcc-4_4-branch
1.35 + * branches/gccgo
1.36 + * branches/google
1.37 + * tags/gcc_4_7_1_release
1.38 + * tags/microblaze-4.4.2
1.39 +
1.40 +config GCC_REVISION
1.41 + string
1.42 + prompt "Revision to use"
1.43 + default "HEAD"
1.44 + help
1.45 + Enter the revision of you want to use. Default is HEAD
1.46 +
1.47 + A revision argument can be one of:
1.48 + NUMBER revision number
1.49 + '{' DATE '}' revision at start of the date (*)
1.50 + 'HEAD' latest in repository
1.51 +
1.52 + (*) If you want to use a date, please use ISO-8601 formats if
1.53 + at all possible.
1.54 +
1.55 +config GCC_HTTP
1.56 + bool
1.57 + prompt "use http:// instead of svn://"
1.58 + help
1.59 + By default, when gcc is downloaded it is checked out using
1.60 + svn://gcc.gnu.org/svn/gcc. This option allows you to download gcc
1.61 + from http://gcc.gnu.org/svn/gcc, if you are behind a proxy or firewall.
1.62 + If you are behind a proxy, don't forget to update your
1.63 + .subversion/servers file with your proxy info in [global].
1.64 +
1.65 +config GCC_CHECKOUT
1.66 + bool
1.67 + prompt "checkout instead of export"
1.68 + help
1.69 + By default, the gcc download will be an export of the subversion
1.70 + repository. If you say 'y' here, then the repository will instead be
1.71 + checked-out, so that you can update it later.
1.72 +
1.73 + Note that crosstool-NG will *not* update your working copy, you will
1.74 + have to do that yourself.
1.75 +
1.76 +endif
1.77 +
1.78 config CC_GCC_4_2
1.79 bool
1.80 select CC_GCC_4_2_or_later
1.81 @@ -301,6 +365,18 @@
1.82 bool
1.83 select CC_GCC_4_6_or_later
1.84
1.85 +config CC_GCC_latest
1.86 + bool
1.87 + select CC_GCC_4_7_or_later
1.88 + select CC_GCC_USE_GMP_MPFR
1.89 + select CC_GCC_USE_MPC
1.90 + select CC_GCC_HAS_GRAPHITE
1.91 + select CC_GCC_HAS_LTO
1.92 + select CC_GCC_HAS_PKGVERSION_BUGURL
1.93 + select CC_GCC_HAS_BUILD_ID
1.94 + select CC_GCC_HAS_LNK_HASH_STYLE
1.95 + select CC_GCC_HAS_LIBQUADMATH
1.96 +
1.97 config CC_GCC_HAS_GRAPHITE
1.98 bool
1.99
1.100 @@ -362,6 +438,7 @@
1.101
1.102 config CC_VERSION
1.103 string
1.104 + default "SVN" if CC_V_SVN
1.105 # Don't remove next line
1.106 # CT_INSERT_VERSION_STRING_BELOW
1.107 default "linaro-4.7-2012.08" if CC_V_linaro_4_7_2012_08
2.1 --- a/scripts/build/cc/gcc.sh Sun Aug 26 10:35:20 2012 +0100
2.2 +++ b/scripts/build/cc/gcc.sh Wed Aug 22 12:26:10 2012 -0700
2.3 @@ -4,30 +4,49 @@
2.4
2.5 # Download gcc
2.6 do_cc_get() {
2.7 - local linaro_version
2.8 - local linaro_series
2.9 - local linaro_base_url="http://launchpad.net/gcc-linaro"
2.10 + if [ -n "${CT_CC_V_SVN}" ]; then
2.11 + # Get gcc from SVN!
2.12 + local svn_base
2.13
2.14 + if [ "${CT_GCC_HTTP}" = "y" ]; then
2.15 + svn_base="http://gcc.gnu.org/svn/gcc"
2.16 + else
2.17 + svn_base="svn://gcc.gnu.org/svn/gcc"
2.18 + fi
2.19 +
2.20 + svn_base+="/${CT_GCC_BRANCH:-trunk}"
2.21
2.22 - # Account for the Linaro versioning
2.23 - linaro_version="$( echo "${CT_CC_VERSION}" \
2.24 - |sed -r -e 's/^linaro-//;' \
2.25 - )"
2.26 - linaro_series="$( echo "${linaro_version}" \
2.27 - |sed -r -e 's/-.*//;' \
2.28 - )"
2.29 + CT_CC_VERSION="${CT_GCC_BRANCH//\//_}"
2.30
2.31 - # Ah! gcc folks are kind of 'different': they store the tarballs in
2.32 - # subdirectories of the same name!
2.33 - # Arrgghh! Some of those versions does not follow this convention:
2.34 - # gcc-3.3.3 lives in releases/gcc-3.3.3, while gcc-2.95.* isn't in a
2.35 - # subdirectory!
2.36 - CT_GetFile "gcc-${CT_CC_VERSION}" \
2.37 - {ftp,http}://ftp.gnu.org/gnu/gcc{,{,/releases}/gcc-${CT_CC_VERSION}} \
2.38 - ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-${CT_CC_VERSION} \
2.39 - ftp://ftp.uvsq.fr/pub/gcc/snapshots/${CT_CC_VERSION} \
2.40 - "${linaro_base_url}/${linaro_series}/${linaro_version}/+download"
2.41 + CT_GetSVN "gcc-${CT_CC_VERSION}" \
2.42 + "${svn_base}/" \
2.43 + "${CT_GCC_REVISION:-HEAD}"
2.44 + else
2.45 + local linaro_version
2.46 + local linaro_series
2.47 + local linaro_base_url="http://launchpad.net/gcc-linaro"
2.48
2.49 +
2.50 + # Account for the Linaro versioning
2.51 + linaro_version="$( echo "${CT_CC_VERSION}" \
2.52 + |sed -r -e 's/^linaro-//;' \
2.53 + )"
2.54 + linaro_series="$( echo "${linaro_version}" \
2.55 + |sed -r -e 's/-.*//;' \
2.56 + )"
2.57 +
2.58 + # Ah! gcc folks are kind of 'different': they store the tarballs in
2.59 + # subdirectories of the same name!
2.60 + # Arrgghh! Some of those versions does not follow this convention:
2.61 + # gcc-3.3.3 lives in releases/gcc-3.3.3, while gcc-2.95.* isn't in a
2.62 + # subdirectory!
2.63 + CT_GetFile "gcc-${CT_CC_VERSION}" \
2.64 + {ftp,http}://ftp.gnu.org/gnu/gcc{,{,/releases}/gcc-${CT_CC_VERSION}} \
2.65 + ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-${CT_CC_VERSION} \
2.66 + ftp://ftp.uvsq.fr/pub/gcc/snapshots/${CT_CC_VERSION} \
2.67 + "${linaro_base_url}/${linaro_series}/${linaro_version}/+download"
2.68 +
2.69 + fi # -n ${CT_CC_V_SVN}
2.70 # Starting with GCC 4.3, ecj is used for Java, and will only be
2.71 # built if the configure script finds ecj.jar at the top of the
2.72 # GCC source tree, which will not be there unless we get it and