1.1 --- a/scripts/build/libc/glibc-eglibc.sh-common Wed May 18 23:00:46 2011 +0200
1.2 +++ b/scripts/build/libc/glibc-eglibc.sh-common Tue May 31 16:27:39 2011 +0200
1.3 @@ -1,5 +1,49 @@
1.4 # This file contains the functions common to glibc and eglibc
1.5
1.6 +# Extract the C library tarball(s)
1.7 +do_libc_extract() {
1.8 + local addon
1.9 +
1.10 + # Extract the main tarball
1.11 + CT_Extract "${CT_LIBC}-${CT_LIBC_VERSION}"
1.12 + CT_Pushd "${CT_SRC_DIR}/${CT_LIBC}-${CT_LIBC_VERSION}"
1.13 + CT_Patch nochdir "${CT_LIBC}" "${CT_LIBC_VERSION}"
1.14 +
1.15 + # Extract the add-opns
1.16 + for addon in $(do_libc_add_ons_list " "); do
1.17 + # NPTL addon is not to be extracted, in any case
1.18 + [ "${addon}" = "nptl" ] && continue || true
1.19 +
1.20 + CT_Extract nochdir "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}"
1.21 +
1.22 + CT_TestAndAbort "Error in add-on '${addon}': both short and long names in tarball" \
1.23 + -d "${addon}" -a -d "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}"
1.24 +
1.25 + # Some addons have the 'long' name, while others have the
1.26 + # 'short' name, but patches are non-uniformly built with
1.27 + # either the 'long' or 'short' name, whatever the addons name
1.28 + # but we prefer the 'short' name and avoid duplicates.
1.29 + if [ -d "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" ]; then
1.30 + mv "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" "${addon}"
1.31 + fi
1.32 +
1.33 + ln -s "${addon}" "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}"
1.34 +
1.35 + CT_Patch nochdir "${CT_LIBC}" "${addon}-${CT_LIBC_VERSION}"
1.36 +
1.37 + # Remove the long name since it can confuse configure scripts to run
1.38 + # the same source twice.
1.39 + rm "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}"
1.40 + done
1.41 +
1.42 + # The configure files may be older than the configure.in files
1.43 + # if using a snapshot (or even some tarballs). Fake them being
1.44 + # up to date.
1.45 + find . -type f -name configure -exec touch {} \; 2>&1 |CT_DoLog ALL
1.46 +
1.47 + CT_Popd
1.48 +}
1.49 +
1.50 # Build and install headers and start files
1.51 do_libc_start_files() {
1.52 local src_dir="${CT_SRC_DIR}/${CT_LIBC}-${CT_LIBC_VERSION}"