From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23895 invoked by alias); 19 Aug 2012 08:31:06 -0000 Received: (qmail 23861 invoked by uid 22791); 19 Aug 2012 08:30:59 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_SV X-Spam-Check-By: sourceware.org Received: from mail-pb0-f41.google.com (HELO mail-pb0-f41.google.com) (209.85.160.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 19 Aug 2012 08:30:45 +0000 Received: by pbbro12 with SMTP id ro12so6109602pbb.0 for ; Sun, 19 Aug 2012 01:30:44 -0700 (PDT) Received: by 10.66.75.228 with SMTP id f4mr21389670paw.52.1345365044733; Sun, 19 Aug 2012 01:30:44 -0700 (PDT) Received: from flambe.is-a-geek.org (c-24-19-56-184.hsd1.wa.comcast.net. [24.19.56.184]) by mx.google.com with ESMTPS id qn3sm8635419pbc.6.2012.08.19.01.30.42 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Aug 2012 01:30:42 -0700 (PDT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [PATCH 1 of 3] cc/gcc: Add the ability to build gcc from svn X-Mercurial-Node: 1c7363e92ede42f223edf3497fab348e16d4b05d Message-Id: <1c7363e92ede42f223ed.1345364050@flambe.is-a-geek.org> In-Reply-To: References: User-Agent: Mercurial-patchbomb/2.2.2 Date: Sun, 19 Aug 2012 08:31:00 -0000 From: Bryan Hundven To: "Yann E. MORIN" Cc: crossgcc@sourceware.org X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00065.txt.bz2 # HG changeset patch # User Bryan Hundven # Date 1345363489 25200 # Node ID 1c7363e92ede42f223edf3497fab348e16d4b05d # Parent 11c23aa9c9f9e748cd6059367ef19fff23d61bd5 cc/gcc: Add the ability to build gcc from svn I took some of the svn functionality from eglibc. Signed-off-by: Bryan Hundven diff -r 11c23aa9c9f9 -r 1c7363e92ede config/cc/gcc.in --- a/config/cc/gcc.in Wed Aug 15 22:06:22 2012 +0200 +++ b/config/cc/gcc.in Sun Aug 19 01:04:49 2012 -0700 @@ -36,6 +36,12 @@ # Don't remove next line # CT_INSERT_VERSION_BELOW +config CC_V_SVN + bool + prompt "gcc from svn" + depends on EXPERIMENTAL + select CC_GCC_latest + config CC_V_linaro_4_7_2012_07 bool prompt "linaro-4.7-2012.07 (EXPERIMENTAL)" @@ -228,6 +234,59 @@ endchoice +if CC_V_SVN && CONFIGURE_has_svn + +config GCC_BRANCH + string + prompt "Branch to use" + default "trunk" + help + Enter the branch of gcc to use. + Default is trunk + + You can find other branches here: + http://gcc.gnu.org/viewcvs/branches/ + +config GCC_REVISION + string + prompt "Revision to use" + default "HEAD" + help + Enter the revision of trunk you want to use. + Default is HEAD + + A revision argument can be one of: + NUMBER revision number + '{' DATE '}' revision at start of the date (*) + 'HEAD' latest in repository + + (*) If you want to use a date, please use ISO-8601 formats if + at all possible. + +config GCC_HTTP + bool + prompt "use http:// instead of svn://" + help + By default, when gcc is downloaded it is checked out using + svn://gcc.gnu.org/svn/gcc. This option allows you to download gcc + from http://gcc.gnu.org/svn/gcc, if you are behind a proxy or firewall. + If you are behind a proxy, don't forget to update your + .subversion/servers file with your proxy info in [global]. + +config GCC_CHECKOUT + bool + prompt "checkout instead of export" + default n + help + By default, the gcc download will be an export of the subversion + repository. If you say 'y' here, then the repository will instead be + checked-out, so that you can update it later. + + Note that crosstool-NG will *not* update your working copy, you will + have to do that yourself. + +endif + config CC_GCC_4_2 bool select CC_GCC_4_2_or_later @@ -301,6 +360,10 @@ bool select CC_GCC_4_6_or_later +config CC_GCC_latest + bool + select CC_GCC_4_7 + config CC_GCC_HAS_GRAPHITE bool @@ -364,6 +427,7 @@ string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW + default "SVN" if CC_V_SVN default "linaro-4.7-2012.07" if CC_V_linaro_4_7_2012_07 default "4.7.1" if CC_V_4_7_1 default "4.7.0" if CC_V_4_7_0 diff -r 11c23aa9c9f9 -r 1c7363e92ede scripts/build/cc/gcc.sh --- a/scripts/build/cc/gcc.sh Wed Aug 15 22:06:22 2012 +0200 +++ b/scripts/build/cc/gcc.sh Sun Aug 19 01:04:49 2012 -0700 @@ -4,31 +4,53 @@ # Download gcc do_cc_get() { - local linaro_version - local linaro_series - local linaro_base_url="http://launchpad.net/gcc-linaro" + if [ -n ${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 + + case "${CT_GCC_BRANCH}" in + trunk) svn_base+="/trunk";; + *) svn_base+="/branches/${CT_GCC_BRANCH}";; + esac + + CT_CC_VERSION="${CT_GCC_BRANCH}" + CT_GetSVN "gcc-${CT_GCC_BRANCH}" \ + "${svn_base}/" \ + "${CT_GCC_REVISION:-HEAD}" + else + # Get gcc from a released tarball! + 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! That's because gcc is such /crap/ that - # it is such /big/ that it needs being splitted for distribution! Sad. :-( - # 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! You bastard! - 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" + # 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! That's because gcc is such /crap/ that + # it is such /big/ that it needs being splitted for distribution! Sad. :-( + # 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! You bastard! + 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 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 @@ -41,14 +63,16 @@ # Extract gcc do_cc_extract() { - CT_Extract "gcc-${CT_CC_VERSION}" - CT_Patch "gcc" "${CT_CC_VERSION}" + if [ -z "${CC_V_SVN}" ]; then + CT_Extract "gcc-${CT_CC_VERSION}" + CT_Patch "gcc" "${CT_CC_VERSION}" - # Copy ecj-latest.jar to ecj.jar at the top of the GCC source tree - if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" \ - -a ! -f "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/ecj.jar" \ - ]; then - CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/ecj-latest.jar" "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/ecj.jar" + # Copy ecj-latest.jar to ecj.jar at the top of the GCC source tree + if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" \ + -a ! -f "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/ecj.jar" \ + ]; then + CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/ecj-latest.jar" "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/ecj.jar" + fi fi } -- For unsubscribe information see http://sourceware.org/lists.html#faq