Allow selecting 'latest' snapshot, as well as 'specific' date snapshot for glibc.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Jul 22 13:29:08 2008 +0000 (2008-07-22)
changeset 710021546adce69
parent 709 8d945f24f7ae
child 711 c9bb5606a265
Allow selecting 'latest' snapshot, as well as 'specific' date snapshot for glibc.
Update uClibc config to commonalise some help.

/trunk/scripts/build/libc_glibc.sh | 22 20 2 0 ++++++++++++++++++++--
/trunk/config/libc/glibc.in | 12 12 0 0 ++++++++++++
/trunk/config/libc/uClibc.in | 12 4 8 0 ++++--------
/trunk/config/libc.in | 13 13 0 0 +++++++++++++
4 files changed, 49 insertions(+), 10 deletions(-)
config/libc.in
config/libc/glibc.in
config/libc/uClibc.in
scripts/build/libc_glibc.sh
     1.1 --- a/config/libc.in	Tue Jul 22 09:32:27 2008 +0000
     1.2 +++ b/config/libc.in	Tue Jul 22 13:29:08 2008 +0000
     1.3 @@ -44,4 +44,17 @@
     1.4  source config/libc/uClibc.in
     1.5  endif
     1.6  
     1.7 +config LIBC_VERSION
     1.8 +    help
     1.9 +      Enter the date of the snapshot you want to use in the form: YYYYMMDD
    1.10 +      where YYYY is the 4-digit year, MM the 2-digit month and DD the 2-digit
    1.11 +      day in the month.
    1.12 +      
    1.13 +      Please note:
    1.14 +      - glibc has snapshots done every monday, and only the last ten are kept.
    1.15 +      - uClibc has daily snapshots, and only the last 30-or-so are kept.
    1.16 +      
    1.17 +      So if you want to be able to re-build your toolchain later, you will
    1.18 +      have to sacve your C library tarball by yourself.
    1.19 +
    1.20  endmenu
     2.1 --- a/config/libc/glibc.in	Tue Jul 22 09:32:27 2008 +0000
     2.2 +++ b/config/libc/glibc.in	Tue Jul 22 13:29:08 2008 +0000
     2.3 @@ -4,6 +4,16 @@
     2.4      bool
     2.5      prompt "glibc version"
     2.6  
     2.7 +config LIBC_V_LATEST
     2.8 +    bool
     2.9 +    prompt "'latest' snapshot (EXPERIMENTAL)"
    2.10 +    depends on EXPERIMENTAL
    2.11 +
    2.12 +config LIBC_V_date
    2.13 +    bool
    2.14 +    prompt "<specific date> (EXPERIMENTAL)"
    2.15 +    depends on EXPERIMENTAL
    2.16 +
    2.17  config LIBC_V_2_3_6
    2.18      bool
    2.19      prompt "2.3.6 (OBSOLETE)"
    2.20 @@ -36,6 +46,8 @@
    2.21  
    2.22  config LIBC_VERSION
    2.23      string
    2.24 +    prompt "Enter date (YYYYMMDD)" if LIBC_V_date
    2.25 +    default "latest" if LIBC_V_LATEST
    2.26      default "2.3.6" if LIBC_V_2_3_6
    2.27      default "2.4" if LIBC_V_2_4
    2.28      default "2.5" if LIBC_V_2_5
     3.1 --- a/config/libc/uClibc.in	Tue Jul 22 09:32:27 2008 +0000
     3.2 +++ b/config/libc/uClibc.in	Tue Jul 22 13:29:08 2008 +0000
     3.3 @@ -6,11 +6,13 @@
     3.4  
     3.5  config LIBC_V_snapshot
     3.6      bool
     3.7 -    prompt "latest snapshot"
     3.8 +    prompt "latest snapshot (EXPERIMENTAL)"
     3.9 +    depends on EXPERIMENTAL
    3.10  
    3.11  config LIBC_V_specific_date
    3.12      bool
    3.13 -    prompt "<specific date>"
    3.14 +    prompt "<specific date> (EXPERIMENTAL)"
    3.15 +    depends on EXPERIMENTAL
    3.16  
    3.17  config LIBC_V_0_9_28
    3.18      bool
    3.19 @@ -50,12 +52,6 @@
    3.20      default "0.9.29" if LIBC_V_0_9_29
    3.21  # CT_INSERT_VERSION_STRING_ABOVE
    3.22  # Don't remove above line!
    3.23 -    help
    3.24 -      Enter the date of the snapshot you want to use in the form: YYYYMMDD
    3.25 -      where YYYY is the 4-digit year, MM the 2-digit month and DD the 2-digit
    3.26 -      day in the month.
    3.27 -      
    3.28 -      Please note that uClibc site removes snapshots older than a month.
    3.29  
    3.30  choice
    3.31      bool
     4.1 --- a/scripts/build/libc_glibc.sh	Tue Jul 22 09:32:27 2008 +0000
     4.2 +++ b/scripts/build/libc_glibc.sh	Tue Jul 22 13:29:08 2008 +0000
     4.3 @@ -17,13 +17,19 @@
     4.4      # Ah! Not all GNU folks seem stupid. All glibc releases are in the same
     4.5      # directory. Good. Alas, there is no snapshot there. I'll deal with them
     4.6      # later on... :-/
     4.7 -    CT_GetFile "${CT_LIBC_FILE}" {ftp,http}://ftp.gnu.org/gnu/glibc
     4.8 +    CT_GetFile "${CT_LIBC_FILE}"                        \
     4.9 +               {ftp,http}://ftp.gnu.org/gnu/glibc       \
    4.10 +               ftp://gcc.gnu.org/pub/glibc/releases     \
    4.11 +               ftp://gcc.gnu.org/pub/glibc/snapshots
    4.12  
    4.13      # C library addons
    4.14      for addon in $(do_libc_add_ons_list " "); do
    4.15          # NPTL addon is not to be downloaded, in any case
    4.16          [ "${addon}" = "nptl" ] && continue || true
    4.17 -        CT_GetFile "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" {ftp,http}://ftp.gnu.org/gnu/glibc
    4.18 +        CT_GetFile "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" \
    4.19 +                   {ftp,http}://ftp.gnu.org/gnu/glibc       \
    4.20 +                   ftp://gcc.gnu.org/pub/glibc/releases     \
    4.21 +                   ftp://gcc.gnu.org/pub/glibc/snapshots
    4.22      done
    4.23  
    4.24      return 0
    4.25 @@ -219,6 +225,12 @@
    4.26      # Add some default CC args
    4.27      glibc_version_major=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^([^\.]+)\..*/\1/')
    4.28      glibc_version_minor=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^[^\.]+\.([^.]+).*/\1/')
    4.29 +    # In case we're using a snapshot, fake a >=2.6 version.
    4.30 +    if [    "${CT_LIBC_V_LATEST}" = "y" \
    4.31 +         -o "${CT_LIBC_V_date}" = "y"   ]; then
    4.32 +        glibc_version_major=3
    4.33 +        glibc_version_minor=0
    4.34 +    fi
    4.35      if [    ${glibc_version_major} -eq 2 -a ${glibc_version_minor} -ge 6    \
    4.36           -o ${glibc_version_major} -gt 2                                    ]; then
    4.37          # Don't use -pipe: configure chokes on it for glibc >= 2.6.
    4.38 @@ -324,6 +336,12 @@
    4.39      # Add some default CC args
    4.40      glibc_version_major=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^([^\.]+)\..*/\1/')
    4.41      glibc_version_minor=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^[^\.]+\.([^.]+).*/\1/')
    4.42 +    # In case we're using a snapshot, fake a >=2.6 version.
    4.43 +    if [    "${CT_LIBC_V_LATEST}" = "y" \
    4.44 +         -o "${CT_LIBC_V_date}" = "y"   ]; then
    4.45 +        glibc_version_major=3
    4.46 +        glibc_version_minor=0
    4.47 +    fi
    4.48      if [    ${glibc_version_major} -eq 2 -a ${glibc_version_minor} -ge 6    \
    4.49           -o ${glibc_version_major} -gt 2                                    ]; then
    4.50          # Don't use -pipe: configure chokes on it for glibc >= 2.6.