# HG changeset patch # User "Yann E. MORIN" # Date 1231073173 0 # Node ID c3516fc7460d18c12e2ffa45ca3100ce51f48fb9 # Parent 0abc2de191b003f4e64857344fb0419cb0373bd0 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(-) diff -r 0abc2de191b0 -r c3516fc7460d config/libc/glibc.in --- a/config/libc/glibc.in Sun Jan 04 12:43:54 2009 +0000 +++ b/config/libc/glibc.in Sun Jan 04 12:46:13 2009 +0000 @@ -36,6 +36,16 @@ bool prompt "2.7" +config LIBC_V_2_8 + bool + prompt "2_8" + select LIBC_GLIBC_2_8_or_later + +config LIBC_V_2_9 + bool + prompt "2_9" + select LIBC_GLIBC_2_8_or_later + # CT_INSERT_VERSION_ABOVE # Don't remove above line! @@ -62,6 +72,45 @@ default "2.6" if LIBC_V_2_6 default "2.6.1" if LIBC_V_2_6_1 default "2.7" if LIBC_V_2_7 + default "2_8" if LIBC_V_2_8 + default "2_9" if LIBC_V_2_9 # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! +config LIBC_GLIBC_2_8_or_later + bool + default n + +if LIBC_GLIBC_2_8_or_later + +config LIBC_GLIBC_latest_snapshot + bool + prompt "Use latest nightly snapshot" + default n + help + Say 'y' to use the latest nightly snapshot. + Not recommended, as the toolchain will not be reproducible. + +if ! LIBC_GLIBC_latest_snapshot + +comment "Using CVS checkout" + +config LIBC_GLIBC_CVS_date + string + prompt "checkout as of date" + default "" + help + The date, in ISO-8601 format, at which to check out the repository. + +#config LIBC_GLIBC_CVS_CHECKOUT +# bool +# prompt "checkout instead of export" +# default n +# help +# Use checkout rather than export, so that you can later update +# the sources. +# Not recommended, as the toolchain could be non-reproducible. + +endif # ! LIBC_GLIBC_latest_snapshot + +endif # LIBC_GLIBC_2_8_or_later diff -r 0abc2de191b0 -r c3516fc7460d scripts/build/libc/glibc.sh --- a/scripts/build/libc/glibc.sh Sun Jan 04 12:43:54 2009 +0000 +++ b/scripts/build/libc/glibc.sh Sun Jan 04 12:46:13 2009 +0000 @@ -4,23 +4,51 @@ # Download glibc do_libc_get() { + local date + # Ah! Not all GNU folks seem stupid. All glibc releases are in the same # directory. Good. Alas, there is no snapshot there. I'll deal with them # later on... :-/ - CT_GetFile "${CT_LIBC_FILE}" \ - {ftp,http}://ftp.gnu.org/gnu/glibc \ - ftp://gcc.gnu.org/pub/glibc/releases \ - ftp://gcc.gnu.org/pub/glibc/snapshots + # Update: sadly, glibc folks do be stupid: they no longer build + # release tarballs as of glibc-2.8, hence forcing us to fetch + # from CVS (CVS! Don't those guys know the world of SCM has + # evolved since the dawn ages of CVS?) Sigh... + if [ "${CT_LIBC_GLIBC_2_8_or_later}" = "y" ]; then + # No release tarball available... + date="${CT_LIBC_GLIBC_CVS_date}" + CT_GetCVS "${CT_LIBC_FILE}" \ + ":pserver:anoncvs@sources.redhat.com:/cvs/glibc" \ + "libc" \ + "glibc-${CT_LIBC_VERSION}-branch${date:+:}${date}" \ + "${CT_LIBC_FILE}" - # C library addons - for addon in $(do_libc_add_ons_list " "); do - # NPTL addon is not to be downloaded, in any case - [ "${addon}" = "nptl" ] && continue || true - CT_GetFile "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" \ + # C library addons + for addon in $(do_libc_add_ons_list " "); do + # NPTL addon is not to be downloaded, in any case + [ "${addon}" = "nptl" ] && continue || true + CT_GetCVS "glibc-${addon}-${CT_LIBC_VERSION}" \ + ":pserver:anoncvs@sources.redhat.com:/cvs/glibc" \ + "${addon}" \ + "glibc-${CT_LIBC_VERSION}-branch${date:+:}${date}" \ + "glibc-${addon}-${CT_LIBC_VERSION}" + done + else + # Release tarballs are available + CT_GetFile "${CT_LIBC_FILE}" \ {ftp,http}://ftp.gnu.org/gnu/glibc \ ftp://gcc.gnu.org/pub/glibc/releases \ ftp://gcc.gnu.org/pub/glibc/snapshots - done + + # C library addons + for addon in $(do_libc_add_ons_list " "); do + # NPTL addon is not to be downloaded, in any case + [ "${addon}" = "nptl" ] && continue || true + CT_GetFile "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" \ + {ftp,http}://ftp.gnu.org/gnu/glibc \ + ftp://gcc.gnu.org/pub/glibc/releases \ + ftp://gcc.gnu.org/pub/glibc/snapshots + done + fi return 0 }