public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1 of 3] cc/gcc: Add the ability to build gcc from svn
  2012-08-19  8:31 [PATCH 0 of 3] Some random changes Bryan Hundven
  2012-08-19  8:31 ` [PATCH 3 of 3] debug/expat: Update expat to 2.1.0 Bryan Hundven
@ 2012-08-19  8:31 ` Bryan Hundven
  2012-08-20 11:17   ` Yann E. MORIN
  2012-08-19  8:31 ` [PATCH 2 of 3] scripts: use generic urls for sourceforge Bryan Hundven
  2012-08-19  8:35 ` [PATCH 0 of 3] Some random changes Bryan Hundven
  3 siblings, 1 reply; 9+ messages in thread
From: Bryan Hundven @ 2012-08-19  8:31 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

# HG changeset patch
# User Bryan Hundven <bryanhundven@gmail.com>
# 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 <bryanhundven@gmail.com>

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 0 of 3] Some random changes
@ 2012-08-19  8:31 Bryan Hundven
  2012-08-19  8:31 ` [PATCH 3 of 3] debug/expat: Update expat to 2.1.0 Bryan Hundven
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Bryan Hundven @ 2012-08-19  8:31 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

1) use generic sourceforge urls and 302 to a mirror instead of getting a down/dead mirror.
2) update expat to 2.1.0
3) (will most likely get rejected or need revised patches) add the ability to build gcc from svn.

Please test and let me know if anything needs to change.

-Bryan

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3 of 3] debug/expat: Update expat to 2.1.0
  2012-08-19  8:31 [PATCH 0 of 3] Some random changes Bryan Hundven
@ 2012-08-19  8:31 ` Bryan Hundven
  2012-08-19  8:31 ` [PATCH 1 of 3] cc/gcc: Add the ability to build gcc from svn Bryan Hundven
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Bryan Hundven @ 2012-08-19  8:31 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

# HG changeset patch
# User Bryan Hundven <bryanhundven@gmail.com>
# Date 1345363905 25200
# Node ID c59009fdaf23d82822c6c90c2bfbe0c89647e8ad
# Parent  b69ebeb72fef93c04c84c13875849d84fbdc3180
debug/expat: Update expat to 2.1.0

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>

diff -r b69ebeb72fef -r c59009fdaf23 scripts/build/debug/300-gdb.sh
--- a/scripts/build/debug/300-gdb.sh	Sun Aug 19 01:09:40 2012 -0700
+++ b/scripts/build/debug/300-gdb.sh	Sun Aug 19 01:11:45 2012 -0700
@@ -7,7 +7,7 @@
 CT_DEBUG_GDB_NCURSES_VERSION="5.9"
 
 # Ditto for the expat library
-CT_DEBUG_GDB_EXPAT_VERSION="2.0.1"
+CT_DEBUG_GDB_EXPAT_VERSION="2.1.0"
 
 do_debug_gdb_parts() {
     do_gdb=

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2 of 3] scripts: use generic urls for sourceforge
  2012-08-19  8:31 [PATCH 0 of 3] Some random changes Bryan Hundven
  2012-08-19  8:31 ` [PATCH 3 of 3] debug/expat: Update expat to 2.1.0 Bryan Hundven
  2012-08-19  8:31 ` [PATCH 1 of 3] cc/gcc: Add the ability to build gcc from svn Bryan Hundven
@ 2012-08-19  8:31 ` Bryan Hundven
  2012-08-19  8:35 ` [PATCH 0 of 3] Some random changes Bryan Hundven
  3 siblings, 0 replies; 9+ messages in thread
From: Bryan Hundven @ 2012-08-19  8:31 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

# HG changeset patch
# User Bryan Hundven <bryanhundven@gmail.com>
# Date 1345363780 25200
# Node ID b69ebeb72fef93c04c84c13875849d84fbdc3180
# Parent  1c7363e92ede42f223edf3497fab348e16d4b05d
scripts: use generic urls for sourceforge

For expat, duma, and strace, use the generic url and 302 to the mirror
instead of trying to download a file from a downed mirror and
failing.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>

diff -r 1c7363e92ede -r b69ebeb72fef scripts/build/debug/200-duma.sh
--- a/scripts/build/debug/200-duma.sh	Sun Aug 19 01:04:49 2012 -0700
+++ b/scripts/build/debug/200-duma.sh	Sun Aug 19 01:09:40 2012 -0700
@@ -3,7 +3,7 @@
 do_debug_duma_get() {
     local dl_base
 
-    dl_base="http://dfn.dl.sourceforge.net/project/duma/duma"
+    dl_base="http://downloads.sourceforge.net/project/duma/duma"
     dl_base+="/${CT_DUMA_VERSION//_/.}"
 
     # Downloading an non-existing file from sourceforge will give you an
diff -r 1c7363e92ede -r b69ebeb72fef scripts/build/debug/300-gdb.sh
--- a/scripts/build/debug/300-gdb.sh	Sun Aug 19 01:04:49 2012 -0700
+++ b/scripts/build/debug/300-gdb.sh	Sun Aug 19 01:09:40 2012 -0700
@@ -62,7 +62,7 @@
 
     if [ "${do_expat}" = "y" ]; then
         CT_GetFile "expat-${CT_DEBUG_GDB_EXPAT_VERSION}" .tar.gz    \
-                   http://kent.dl.sourceforge.net/project/expat/expat/${CT_DEBUG_GDB_EXPAT_VERSION}
+                   http://downloads.sourceforge.net/project/expat/expat/${CT_DEBUG_GDB_EXPAT_VERSION}
     fi
 }
 
diff -r 1c7363e92ede -r b69ebeb72fef scripts/build/debug/500-strace.sh
--- a/scripts/build/debug/500-strace.sh	Sun Aug 19 01:04:49 2012 -0700
+++ b/scripts/build/debug/500-strace.sh	Sun Aug 19 01:09:40 2012 -0700
@@ -1,7 +1,7 @@
 # Build script for strace
 
 do_debug_strace_get() {
-    local base_url="http://kent.dl.sourceforge.net/project/strace/strace"
+    local base_url="http://downloads.sourceforge.net/project/strace/strace"
     CT_GetFile "strace-${CT_STRACE_VERSION}" "${base_url}/${CT_STRACE_VERSION}"
     # Downloading from sourceforge leaves garbage, cleanup
     CT_DoExecLog ALL rm -f "${CT_TARBALLS_DIR}/showfiles.php"*

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0 of 3] Some random changes
  2012-08-19  8:31 [PATCH 0 of 3] Some random changes Bryan Hundven
                   ` (2 preceding siblings ...)
  2012-08-19  8:31 ` [PATCH 2 of 3] scripts: use generic urls for sourceforge Bryan Hundven
@ 2012-08-19  8:35 ` Bryan Hundven
  3 siblings, 0 replies; 9+ messages in thread
From: Bryan Hundven @ 2012-08-19  8:35 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

On Sun, Aug 19, 2012 at 1:14 AM, Bryan Hundven <bryanhundven@gmail.com> wrote:
> 1) use generic sourceforge urls and 302 to a mirror instead of getting a down/dead mirror.
> 2) update expat to 2.1.0
> 3) (will most likely get rejected or need revised patches) add the ability to build gcc from svn.

Of course... what my .hg/series file had listed and what was in
qseries vs. the order submitted to email were the total opposite.
Oh well. ;)

>
> Please test and let me know if anything needs to change.
>
> -Bryan

-Bryan

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1 of 3] cc/gcc: Add the ability to build gcc from svn
  2012-08-19  8:31 ` [PATCH 1 of 3] cc/gcc: Add the ability to build gcc from svn Bryan Hundven
@ 2012-08-20 11:17   ` Yann E. MORIN
  2012-08-20 15:10     ` Bryan Hundven
  0 siblings, 1 reply; 9+ messages in thread
From: Yann E. MORIN @ 2012-08-20 11:17 UTC (permalink / raw)
  To: Bryan Hundven; +Cc: crossgcc

Bryan, All,

On Sunday 19 August 2012 10:14:10 Bryan Hundven wrote:
> # HG changeset patch
> # User Bryan Hundven <bryanhundven@gmail.com>
> # Date 1345363489 25200
> # Node ID 1c7363e92ede42f223edf3497fab348e16d4b05d
> # Parent  11c23aa9c9f9e748cd6059367ef19fff23d61bd5
> cc/gcc: Add the ability to build gcc from svn

Any reason you do not use the git tree instead?
    http://gcc.gnu.org/wiki/GitMirror

There should already be some provisions for using git in
ct-ng. See:
    scripts/functions:687:CT_GetGit() {
    scripts/functions:812:CT_ExtractGit()

Maybe some stuff is incorrect/missing, and probably it can be enhanced...
YMMV, as they say...

> I took some of the svn functionality from eglibc.
> 
> Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
> 
> 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 @@

Insert svn entry here, not after the comment below. That way, newer versions
added with the scripts/addToolVersion.sh will be properly ordered (I guess
we want SVN to always be at the top).

>  # Don't remove next line
>  # CT_INSERT_VERSION_BELOW
>  
> +config CC_V_SVN
> +    bool
> +    prompt "gcc from svn"
> +    depends on EXPERIMENTAL

+ depends on CONFIGURE_has_svn

> +    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

No need for CONFIGURE_has_svn, it's hiding CC_V_SVN above.

> +
> +config GCC_BRANCH
> +    string
> +    prompt "Branch to use"

Branch or tag to use (see below)

> +    default "trunk"
> +    help
> +      Enter the branch of gcc to use.
> +      Default is trunk

Add a few examples:
  eg.: branches/gcc-4_7-branch, branches/gcc-in-cxx, branches/x32...

And I'd state that the full path to the branch should be specified. That
way, it is possible to use any reference (branch, level-2 branch or tag).

> +      You can find other branches here:
> +       http://gcc.gnu.org/viewcvs/branches/

Probably, the persons that will be using this feature know what branch
they'll want to use. Using svn/git is not for the faint of heart! ;-)
So, I'd remove that last part of the comment.

> +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

- select CC_GCC_4_7
+ select CC_GCC_4_7_or_later
+ select CC_GCC_HAS_GRAPHITE
+ select CC_GCC_HAS_LTO
... and so on...

> +
>  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

case-esac undeed, the full patch nust be specified in the configuration.
(see above)

> +        
> +        CT_CC_VERSION="${CT_GCC_BRANCH}"

Of course, '/' in CT_GCC_BRANCH should be 's:/:_:g'

> +        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!

Well, I guess all the insanities *I* did put in there in the early days
(ie. when nothing would work as expected, and I would get heated quite
fast) should now go... Tatata... Shame on me...

I'll address this issue myself.

> +        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
>  }

Otherwise, untested, but looks good.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1 of 3] cc/gcc: Add the ability to build gcc from svn
  2012-08-20 11:17   ` Yann E. MORIN
@ 2012-08-20 15:10     ` Bryan Hundven
  2012-08-22 15:31       ` Bryan Hundven
  0 siblings, 1 reply; 9+ messages in thread
From: Bryan Hundven @ 2012-08-20 15:10 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

On Mon, Aug 20, 2012 at 4:16 AM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Bryan, All,
>
> On Sunday 19 August 2012 10:14:10 Bryan Hundven wrote:
>> # HG changeset patch
>> # User Bryan Hundven <bryanhundven@gmail.com>
>> # Date 1345363489 25200
>> # Node ID 1c7363e92ede42f223edf3497fab348e16d4b05d
>> # Parent  11c23aa9c9f9e748cd6059367ef19fff23d61bd5
>> cc/gcc: Add the ability to build gcc from svn
>
> Any reason you do not use the git tree instead?
>     http://gcc.gnu.org/wiki/GitMirror
>
> There should already be some provisions for using git in
> ct-ng. See:
>     scripts/functions:687:CT_GetGit() {
>     scripts/functions:812:CT_ExtractGit()
>
> Maybe some stuff is incorrect/missing, and probably it can be enhanced...
> YMMV, as they say...

Development for gcc is on SVN.
I wouldn't expect normal users to build a toolchain from SVN, except
for users building from release branches.

In the same vain, but kind of off-topic, I think it would be nice to
have a wrapper function like:

  CT_GetSource
  CT_ExtractSource

that can take an array of urls as an argument.
For instance:

delcare -a urls

urls+=( ("git", "git://gcc.gnu.org/git/gcc.git") )
urls+=( ("svn", "svn://gcc.gnu.org/svn/gcc") )
urls+=( ("ftp",
"ftp://gcc.gnu.org/pub/gcc/releases/gcc-${VERSION}/gcc-${VERSION}.tar.bz2")
)

CT_GetSource ${urls[${method}]}
CT_ExtractSource ${urls[${method}]}

(granted this stuff won't work, but is the general idea. Its early in
the day... need coffee...)

So that repositories held in multiple vcs formats can be obtained the
way the user prefers. (for instance, if they are a developer, they can
opt for svn and use "checkout" instead of "export" so they can test
their changes.)

>
>> I took some of the svn functionality from eglibc.
>>
>> Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
>>
>> 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 @@
>
> Insert svn entry here, not after the comment below. That way, newer versions
> added with the scripts/addToolVersion.sh will be properly ordered (I guess
> we want SVN to always be at the top).

Good idea.

>
>>  # Don't remove next line
>>  # CT_INSERT_VERSION_BELOW
>>
>> +config CC_V_SVN
>> +    bool
>> +    prompt "gcc from svn"
>> +    depends on EXPERIMENTAL
>
> + depends on CONFIGURE_has_svn

ack.

>
>> +    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
>
> No need for CONFIGURE_has_svn, it's hiding CC_V_SVN above.

ack.

>
>> +
>> +config GCC_BRANCH
>> +    string
>> +    prompt "Branch to use"
>
> Branch or tag to use (see below)

ack.

>
>> +    default "trunk"
>> +    help
>> +      Enter the branch of gcc to use.
>> +      Default is trunk
>
> Add a few examples:
>   eg.: branches/gcc-4_7-branch, branches/gcc-in-cxx, branches/x32...
>
> And I'd state that the full path to the branch should be specified. That
> way, it is possible to use any reference (branch, level-2 branch or tag).

Gotcha. That would make the fetch code in gcc.sh a little cleaner.

>
>> +      You can find other branches here:
>> +       http://gcc.gnu.org/viewcvs/branches/
>
> Probably, the persons that will be using this feature know what branch
> they'll want to use. Using svn/git is not for the faint of heart! ;-)
> So, I'd remove that last part of the comment.

ack.

>
>> +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
>
> - select CC_GCC_4_7
> + select CC_GCC_4_7_or_later
> + select CC_GCC_HAS_GRAPHITE
> + select CC_GCC_HAS_LTO
> ... and so on...

Ok, thanks. I wasn't sure how you'd want that.

>> +
>>  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
>
> case-esac undeed, the full patch nust be specified in the configuration.
> (see above)

Yup. I commented on that above.

>
>> +
>> +        CT_CC_VERSION="${CT_GCC_BRANCH}"
>
> Of course, '/' in CT_GCC_BRANCH should be 's:/:_:g'

Oh, hehe. Good catch!

>
>> +        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!
>
> Well, I guess all the insanities *I* did put in there in the early days
> (ie. when nothing would work as expected, and I would get heated quite
> fast) should now go... Tatata... Shame on me...
>
> I'll address this issue myself.

I just changed the indentation. I kept all the "insanities" intact. :D

>
>> +        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
>>  }
>
> Otherwise, untested, but looks good.

I tested it with trunk. I will fix this up and test branches, tags and
revisions.

I also just noticed that I have added the config option for "checkout"
or "export" but do not handle it. That will be in v2 as well.

Thank you for the review, Yann!

-Bryan

>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1 of 3] cc/gcc: Add the ability to build gcc from svn
  2012-08-20 15:10     ` Bryan Hundven
@ 2012-08-22 15:31       ` Bryan Hundven
  2012-08-22 16:04         ` Yann E. MORIN
  0 siblings, 1 reply; 9+ messages in thread
From: Bryan Hundven @ 2012-08-22 15:31 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

On Mon, Aug 20, 2012 at 8:09 AM, Bryan Hundven <bryanhundven@gmail.com> wrote:
> On Mon, Aug 20, 2012 at 4:16 AM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>> Bryan, All,
>>
>> On Sunday 19 August 2012 10:14:10 Bryan Hundven wrote:
>>> # HG changeset patch
>>> # User Bryan Hundven <bryanhundven@gmail.com>
>>> # Date 1345363489 25200
>>> # Node ID 1c7363e92ede42f223edf3497fab348e16d4b05d
>>> # Parent  11c23aa9c9f9e748cd6059367ef19fff23d61bd5
>>> cc/gcc: Add the ability to build gcc from svn
>>
>> Any reason you do not use the git tree instead?
>>     http://gcc.gnu.org/wiki/GitMirror
>>
>> There should already be some provisions for using git in
>> ct-ng. See:
>>     scripts/functions:687:CT_GetGit() {
>>     scripts/functions:812:CT_ExtractGit()
>>
>> Maybe some stuff is incorrect/missing, and probably it can be enhanced...
>> YMMV, as they say...
>
> Development for gcc is on SVN.
> I wouldn't expect normal users to build a toolchain from SVN, except
> for users building from release branches.
>
> In the same vain, but kind of off-topic, I think it would be nice to
> have a wrapper function like:
>
>   CT_GetSource
>   CT_ExtractSource
>
> that can take an array of urls as an argument.
> For instance:
>
> delcare -a urls
>
> urls+=( ("git", "git://gcc.gnu.org/git/gcc.git") )
> urls+=( ("svn", "svn://gcc.gnu.org/svn/gcc") )
> urls+=( ("ftp",
> "ftp://gcc.gnu.org/pub/gcc/releases/gcc-${VERSION}/gcc-${VERSION}.tar.bz2")
> )
>
> CT_GetSource ${urls[${method}]}
> CT_ExtractSource ${urls[${method}]}
>
> (granted this stuff won't work, but is the general idea. Its early in
> the day... need coffee...)
>
> So that repositories held in multiple vcs formats can be obtained the
> way the user prefers. (for instance, if they are a developer, they can
> opt for svn and use "checkout" instead of "export" so they can test
> their changes.)
>
>>
>>> I took some of the svn functionality from eglibc.
>>>
>>> Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
>>>
>>> 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 @@
>>
>> Insert svn entry here, not after the comment below. That way, newer versions
>> added with the scripts/addToolVersion.sh will be properly ordered (I guess
>> we want SVN to always be at the top).
>
> Good idea.
>
>>
>>>  # Don't remove next line
>>>  # CT_INSERT_VERSION_BELOW
>>>
>>> +config CC_V_SVN
>>> +    bool
>>> +    prompt "gcc from svn"
>>> +    depends on EXPERIMENTAL
>>
>> + depends on CONFIGURE_has_svn
>
> ack.
>
>>
>>> +    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
>>
>> No need for CONFIGURE_has_svn, it's hiding CC_V_SVN above.
>
> ack.
>
>>
>>> +
>>> +config GCC_BRANCH
>>> +    string
>>> +    prompt "Branch to use"
>>
>> Branch or tag to use (see below)
>
> ack.
>
>>
>>> +    default "trunk"
>>> +    help
>>> +      Enter the branch of gcc to use.
>>> +      Default is trunk
>>
>> Add a few examples:
>>   eg.: branches/gcc-4_7-branch, branches/gcc-in-cxx, branches/x32...
>>
>> And I'd state that the full path to the branch should be specified. That
>> way, it is possible to use any reference (branch, level-2 branch or tag).
>
> Gotcha. That would make the fetch code in gcc.sh a little cleaner.
>
>>
>>> +      You can find other branches here:
>>> +       http://gcc.gnu.org/viewcvs/branches/
>>
>> Probably, the persons that will be using this feature know what branch
>> they'll want to use. Using svn/git is not for the faint of heart! ;-)
>> So, I'd remove that last part of the comment.
>
> ack.
>
>>
>>> +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
>>
>> - select CC_GCC_4_7
>> + select CC_GCC_4_7_or_later
>> + select CC_GCC_HAS_GRAPHITE
>> + select CC_GCC_HAS_LTO
>> ... and so on...
>
> Ok, thanks. I wasn't sure how you'd want that.
>
>>> +
>>>  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
>>
>> case-esac undeed, the full patch nust be specified in the configuration.
>> (see above)
>
> Yup. I commented on that above.
>
>>
>>> +
>>> +        CT_CC_VERSION="${CT_GCC_BRANCH}"
>>
>> Of course, '/' in CT_GCC_BRANCH should be 's:/:_:g'
>
> Oh, hehe. Good catch!
>
>>
>>> +        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!
>>
>> Well, I guess all the insanities *I* did put in there in the early days
>> (ie. when nothing would work as expected, and I would get heated quite
>> fast) should now go... Tatata... Shame on me...
>>
>> I'll address this issue myself.
>
> I just changed the indentation. I kept all the "insanities" intact. :D
>
>>
>>> +        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
>>>  }
>>
>> Otherwise, untested, but looks good.
>
> I tested it with trunk. I will fix this up and test branches, tags and
> revisions.
>
> I also just noticed that I have added the config option for "checkout"
> or "export" but do not handle it. That will be in v2 as well.

Yann, I just noticed that checkout/export is not handled for eglibc either.
Maybe I'm missing something?

-Bryan

> Thank you for the review, Yann!
>
> -Bryan
>
>>
>> Regards,
>> Yann E. MORIN.
>>
>> --
>> .-----------------.--------------------.------------------.--------------------.
>> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
>> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
>> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
>> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
>> '------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1 of 3] cc/gcc: Add the ability to build gcc from svn
  2012-08-22 15:31       ` Bryan Hundven
@ 2012-08-22 16:04         ` Yann E. MORIN
  0 siblings, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2012-08-22 16:04 UTC (permalink / raw)
  To: crossgcc; +Cc: Bryan Hundven

On Wednesday 22 August 2012 17:30:49 Bryan Hundven wrote:
> On Mon, Aug 20, 2012 at 8:09 AM, Bryan Hundven <bryanhundven@gmail.com> wrote:
> > I also just noticed that I have added the config option for "checkout"
> > or "export" but do not handle it. That will be in v2 as well.
> 
> Yann, I just noticed that checkout/export is not handled for eglibc either.
> Maybe I'm missing something?

No you did not miss anything. The config option is there, but is not used
anywhere in the code. But I can swear it was earlier.

I'll look at the logs to see when and why it got lost. Thanks for the report!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-08-22 16:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-19  8:31 [PATCH 0 of 3] Some random changes Bryan Hundven
2012-08-19  8:31 ` [PATCH 3 of 3] debug/expat: Update expat to 2.1.0 Bryan Hundven
2012-08-19  8:31 ` [PATCH 1 of 3] cc/gcc: Add the ability to build gcc from svn Bryan Hundven
2012-08-20 11:17   ` Yann E. MORIN
2012-08-20 15:10     ` Bryan Hundven
2012-08-22 15:31       ` Bryan Hundven
2012-08-22 16:04         ` Yann E. MORIN
2012-08-19  8:31 ` [PATCH 2 of 3] scripts: use generic urls for sourceforge Bryan Hundven
2012-08-19  8:35 ` [PATCH 0 of 3] Some random changes Bryan Hundven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).