From 93b0db91b486d9a290487f9c60ef10f9c5a5d731 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 30 May 2011 23:05:28 +0200 Subject: glibc: properly handle internal addons Some addons are bundled with glibc/eglibc, so we should not try to download and extract them. This is done as thus: - at download time: - if the add-on download fails, keep going; - at extract time: - if the addon is present in the source tree, ignore it; - if the addon is missing in the source tree: - if the archive is present, extract it; - if the archive is missing, bail out. Signed-off-by: "Yann E. MORIN" --- scripts/build/libc/glibc.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'scripts/build/libc/glibc.sh') diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index 44731386..c50aa89b 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -27,12 +27,19 @@ do_libc_get() { # C library addons for addon in "${addons_list[@]}"; do - # NPTL addon is not to be downloaded, in any case - [ "${addon}" = "nptl" ] && continue || true - CT_GetFile "glibc-${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 + if ! CT_GetFile "glibc-${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 + then + # Some add-ons are bundled with glibc, others are + # bundled in their own tarball. Eg. NPTL is internal, + # while LinuxThreads was external. Also, for old + # versions of glibc, the libidn add-on was external, + # but with version >=2.10, it is internal. + CT_DoLog DEBUG "Addon '${addon}' could not be downloaded." + CT_DoLog DEBUG "We'll see later if we can find it in the source tree" + fi done return 0 -- cgit v1.2.3