From 7abf35f4729a8edfee6c1549f104fa13352cf65e Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 22 Jul 2008 13:29:08 +0000 Subject: 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(-) diff --git a/config/libc.in b/config/libc.in index e5d62ee..10c89c5 100644 --- a/config/libc.in +++ b/config/libc.in @@ -44,4 +44,17 @@ if LIBC_UCLIBC source config/libc/uClibc.in endif +config LIBC_VERSION + help + Enter the date of the snapshot you want to use in the form: YYYYMMDD + where YYYY is the 4-digit year, MM the 2-digit month and DD the 2-digit + day in the month. + + Please note: + - glibc has snapshots done every monday, and only the last ten are kept. + - uClibc has daily snapshots, and only the last 30-or-so are kept. + + So if you want to be able to re-build your toolchain later, you will + have to sacve your C library tarball by yourself. + endmenu diff --git a/config/libc/glibc.in b/config/libc/glibc.in index e4359b7..4cdc4b7 100644 --- a/config/libc/glibc.in +++ b/config/libc/glibc.in @@ -4,6 +4,16 @@ choice bool prompt "glibc version" +config LIBC_V_LATEST + bool + prompt "'latest' snapshot (EXPERIMENTAL)" + depends on EXPERIMENTAL + +config LIBC_V_date + bool + prompt " (EXPERIMENTAL)" + depends on EXPERIMENTAL + config LIBC_V_2_3_6 bool prompt "2.3.6 (OBSOLETE)" @@ -36,6 +46,8 @@ endchoice config LIBC_VERSION string + prompt "Enter date (YYYYMMDD)" if LIBC_V_date + default "latest" if LIBC_V_LATEST default "2.3.6" if LIBC_V_2_3_6 default "2.4" if LIBC_V_2_4 default "2.5" if LIBC_V_2_5 diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index ecbdefa..8de2755 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -6,11 +6,13 @@ choice config LIBC_V_snapshot bool - prompt "latest snapshot" + prompt "latest snapshot (EXPERIMENTAL)" + depends on EXPERIMENTAL config LIBC_V_specific_date bool - prompt "" + prompt " (EXPERIMENTAL)" + depends on EXPERIMENTAL config LIBC_V_0_9_28 bool @@ -50,12 +52,6 @@ config LIBC_VERSION default "0.9.29" if LIBC_V_0_9_29 # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! - help - Enter the date of the snapshot you want to use in the form: YYYYMMDD - where YYYY is the 4-digit year, MM the 2-digit month and DD the 2-digit - day in the month. - - Please note that uClibc site removes snapshots older than a month. choice bool diff --git a/scripts/build/libc_glibc.sh b/scripts/build/libc_glibc.sh index 2d9568a..1f706ef 100644 --- a/scripts/build/libc_glibc.sh +++ b/scripts/build/libc_glibc.sh @@ -17,13 +17,19 @@ do_libc_get() { # 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 + 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 # 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 + 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 return 0 @@ -219,6 +225,12 @@ do_libc_start_files() { # Add some default CC args glibc_version_major=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^([^\.]+)\..*/\1/') glibc_version_minor=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^[^\.]+\.([^.]+).*/\1/') + # In case we're using a snapshot, fake a >=2.6 version. + if [ "${CT_LIBC_V_LATEST}" = "y" \ + -o "${CT_LIBC_V_date}" = "y" ]; then + glibc_version_major=3 + glibc_version_minor=0 + fi if [ ${glibc_version_major} -eq 2 -a ${glibc_version_minor} -ge 6 \ -o ${glibc_version_major} -gt 2 ]; then # Don't use -pipe: configure chokes on it for glibc >= 2.6. @@ -324,6 +336,12 @@ do_libc() { # Add some default CC args glibc_version_major=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^([^\.]+)\..*/\1/') glibc_version_minor=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^[^\.]+\.([^.]+).*/\1/') + # In case we're using a snapshot, fake a >=2.6 version. + if [ "${CT_LIBC_V_LATEST}" = "y" \ + -o "${CT_LIBC_V_date}" = "y" ]; then + glibc_version_major=3 + glibc_version_minor=0 + fi if [ ${glibc_version_major} -eq 2 -a ${glibc_version_minor} -ge 6 \ -o ${glibc_version_major} -gt 2 ]; then # Don't use -pipe: configure chokes on it for glibc >= 2.6. -- cgit v0.10.2-6-g49f6