Enable using glibc post 2.8:
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jan 04 12:46:13 2009 +0000 (2009-01-04)
changeset 1114c3516fc7460d
parent 1113 0abc2de191b0
child 1115 d3e8767266a2
Enable using glibc post 2.8:
- retrieve tarballs from FTP/HTTP for glibc 2.7 and older
- checkout from CVS for glibc 2.8 and later
- add config options for glibc-2_8 and glibc-2_9

/trunk/scripts/build/libc/glibc.sh | 50 39 11 0 ++++++++++++++++++++++++++++++++++----------
/trunk/config/libc/glibc.in | 49 49 0 0 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 88 insertions(+), 11 deletions(-)
config/libc/glibc.in
scripts/build/libc/glibc.sh
     1.1 --- a/config/libc/glibc.in	Sun Jan 04 12:43:54 2009 +0000
     1.2 +++ b/config/libc/glibc.in	Sun Jan 04 12:46:13 2009 +0000
     1.3 @@ -36,6 +36,16 @@
     1.4      bool
     1.5      prompt "2.7"
     1.6  
     1.7 +config LIBC_V_2_8
     1.8 +    bool
     1.9 +    prompt "2_8"
    1.10 +    select LIBC_GLIBC_2_8_or_later
    1.11 +
    1.12 +config LIBC_V_2_9
    1.13 +    bool
    1.14 +    prompt "2_9"
    1.15 +    select LIBC_GLIBC_2_8_or_later
    1.16 +
    1.17  # CT_INSERT_VERSION_ABOVE
    1.18  # Don't remove above line!
    1.19  
    1.20 @@ -62,6 +72,45 @@
    1.21      default "2.6" if LIBC_V_2_6
    1.22      default "2.6.1" if LIBC_V_2_6_1
    1.23      default "2.7" if LIBC_V_2_7
    1.24 +    default "2_8" if LIBC_V_2_8
    1.25 +    default "2_9" if LIBC_V_2_9
    1.26  # CT_INSERT_VERSION_STRING_ABOVE
    1.27  # Don't remove above line!
    1.28  
    1.29 +config LIBC_GLIBC_2_8_or_later
    1.30 +    bool
    1.31 +    default n
    1.32 +
    1.33 +if LIBC_GLIBC_2_8_or_later
    1.34 +
    1.35 +config LIBC_GLIBC_latest_snapshot
    1.36 +    bool
    1.37 +    prompt "Use latest nightly snapshot"
    1.38 +    default n
    1.39 +    help
    1.40 +      Say 'y' to use the latest nightly snapshot.
    1.41 +      Not recommended, as the toolchain will not be reproducible.
    1.42 +
    1.43 +if ! LIBC_GLIBC_latest_snapshot
    1.44 +
    1.45 +comment "Using CVS checkout"
    1.46 +
    1.47 +config LIBC_GLIBC_CVS_date
    1.48 +    string
    1.49 +    prompt "checkout as of date"
    1.50 +    default ""
    1.51 +    help
    1.52 +      The date, in ISO-8601 format, at which to check out the repository.
    1.53 +
    1.54 +#config LIBC_GLIBC_CVS_CHECKOUT
    1.55 +#    bool
    1.56 +#    prompt "checkout instead of export"
    1.57 +#    default n
    1.58 +#    help
    1.59 +#      Use checkout rather than export, so that you can later update
    1.60 +#      the sources.
    1.61 +#      Not recommended, as the toolchain could be non-reproducible.
    1.62 +
    1.63 +endif # ! LIBC_GLIBC_latest_snapshot
    1.64 +
    1.65 +endif # LIBC_GLIBC_2_8_or_later
     2.1 --- a/scripts/build/libc/glibc.sh	Sun Jan 04 12:43:54 2009 +0000
     2.2 +++ b/scripts/build/libc/glibc.sh	Sun Jan 04 12:46:13 2009 +0000
     2.3 @@ -4,23 +4,51 @@
     2.4  
     2.5  # Download glibc
     2.6  do_libc_get() {
     2.7 +   local date
     2.8 +
     2.9      # Ah! Not all GNU folks seem stupid. All glibc releases are in the same
    2.10      # directory. Good. Alas, there is no snapshot there. I'll deal with them
    2.11      # later on... :-/
    2.12 -    CT_GetFile "${CT_LIBC_FILE}"                        \
    2.13 -               {ftp,http}://ftp.gnu.org/gnu/glibc       \
    2.14 -               ftp://gcc.gnu.org/pub/glibc/releases     \
    2.15 -               ftp://gcc.gnu.org/pub/glibc/snapshots
    2.16 +    # Update: sadly, glibc folks do be stupid: they no longer build
    2.17 +    # release tarballs as of glibc-2.8, hence forcing us to fetch
    2.18 +    # from CVS (CVS! Don't those guys know the world of SCM has
    2.19 +    # evolved since the dawn ages of CVS?) Sigh...
    2.20 +    if [ "${CT_LIBC_GLIBC_2_8_or_later}" = "y" ]; then
    2.21 +        # No release tarball available...
    2.22 +        date="${CT_LIBC_GLIBC_CVS_date}"
    2.23 +        CT_GetCVS "${CT_LIBC_FILE}"                                     \
    2.24 +                  ":pserver:anoncvs@sources.redhat.com:/cvs/glibc"      \
    2.25 +                  "libc"                                                \
    2.26 +                  "glibc-${CT_LIBC_VERSION}-branch${date:+:}${date}"    \
    2.27 +                  "${CT_LIBC_FILE}"
    2.28  
    2.29 -    # C library addons
    2.30 -    for addon in $(do_libc_add_ons_list " "); do
    2.31 -        # NPTL addon is not to be downloaded, in any case
    2.32 -        [ "${addon}" = "nptl" ] && continue || true
    2.33 -        CT_GetFile "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" \
    2.34 +        # C library addons
    2.35 +        for addon in $(do_libc_add_ons_list " "); do
    2.36 +            # NPTL addon is not to be downloaded, in any case
    2.37 +            [ "${addon}" = "nptl" ] && continue || true
    2.38 +            CT_GetCVS "glibc-${addon}-${CT_LIBC_VERSION}"                   \
    2.39 +                      ":pserver:anoncvs@sources.redhat.com:/cvs/glibc"      \
    2.40 +                      "${addon}"                                            \
    2.41 +                      "glibc-${CT_LIBC_VERSION}-branch${date:+:}${date}"    \
    2.42 +                      "glibc-${addon}-${CT_LIBC_VERSION}"
    2.43 +        done
    2.44 +    else
    2.45 +        # Release tarballs are available
    2.46 +        CT_GetFile "${CT_LIBC_FILE}"                        \
    2.47                     {ftp,http}://ftp.gnu.org/gnu/glibc       \
    2.48                     ftp://gcc.gnu.org/pub/glibc/releases     \
    2.49                     ftp://gcc.gnu.org/pub/glibc/snapshots
    2.50 -    done
    2.51 +
    2.52 +        # C library addons
    2.53 +        for addon in $(do_libc_add_ons_list " "); do
    2.54 +            # NPTL addon is not to be downloaded, in any case
    2.55 +            [ "${addon}" = "nptl" ] && continue || true
    2.56 +            CT_GetFile "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" \
    2.57 +                       {ftp,http}://ftp.gnu.org/gnu/glibc       \
    2.58 +                       ftp://gcc.gnu.org/pub/glibc/releases     \
    2.59 +                       ftp://gcc.gnu.org/pub/glibc/snapshots
    2.60 +        done
    2.61 +    fi
    2.62  
    2.63      return 0
    2.64  }