2007-02-24 11:00:05 +00:00
|
|
|
# This file adds functions to build glibc
|
|
|
|
# Copyright 2007 Yann E. MORIN
|
|
|
|
# Licensed under the GPL v2. See COPYING in the root of this package
|
|
|
|
|
2011-01-22 21:37:25 +00:00
|
|
|
# Add the definitions common to glibc and eglibc
|
|
|
|
# do_libc_start_files
|
2011-01-19 23:27:36 +00:00
|
|
|
# do_libc
|
|
|
|
# do_libc_finish
|
|
|
|
# do_libc_add_ons_list
|
|
|
|
# do_libc_min_kernel_config
|
2011-01-22 21:37:25 +00:00
|
|
|
. "${CT_LIB_DIR}/scripts/build/libc/glibc-eglibc.sh-common"
|
|
|
|
|
2007-05-07 09:04:02 +00:00
|
|
|
# Download glibc
|
2007-05-07 15:57:02 +00:00
|
|
|
do_libc_get() {
|
2009-03-15 20:50:40 +00:00
|
|
|
local date
|
|
|
|
local version
|
2009-08-19 17:44:43 +00:00
|
|
|
local -a addons_list
|
|
|
|
|
|
|
|
addons_list=($(do_libc_add_ons_list " "))
|
2007-05-07 09:04:02 +00:00
|
|
|
|
2010-01-11 21:47:58 +00:00
|
|
|
# Main source
|
|
|
|
CT_GetFile "glibc-${CT_LIBC_VERSION}" \
|
|
|
|
{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 "${addons_list[@]}"; do
|
|
|
|
# NPTL addon is not to be downloaded, in any case
|
|
|
|
[ "${addon}" = "nptl" ] && continue || true
|
|
|
|
CT_GetFile "glibc-${addon}-${CT_LIBC_VERSION}" \
|
2008-07-22 13:29:08 +00:00
|
|
|
{ftp,http}://ftp.gnu.org/gnu/glibc \
|
|
|
|
ftp://gcc.gnu.org/pub/glibc/releases \
|
|
|
|
ftp://gcc.gnu.org/pub/glibc/snapshots
|
2010-01-11 21:47:58 +00:00
|
|
|
done
|
2007-05-07 15:57:02 +00:00
|
|
|
|
|
|
|
return 0
|
2007-05-07 09:04:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Extract glibc
|
|
|
|
do_libc_extract() {
|
2009-08-19 17:44:43 +00:00
|
|
|
local -a addons_list
|
|
|
|
|
|
|
|
addons_list=($(do_libc_add_ons_list " "))
|
2009-03-15 20:50:40 +00:00
|
|
|
|
2010-01-11 21:47:58 +00:00
|
|
|
CT_Extract "glibc-${CT_LIBC_VERSION}"
|
2009-03-15 20:50:40 +00:00
|
|
|
|
2010-01-11 21:47:58 +00:00
|
|
|
CT_Pushd "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}"
|
2010-04-11 21:18:10 +00:00
|
|
|
CT_Patch nochdir "glibc" "${CT_LIBC_VERSION}"
|
2007-05-07 09:04:02 +00:00
|
|
|
|
|
|
|
# C library addons
|
2009-08-19 17:44:43 +00:00
|
|
|
for addon in "${addons_list[@]}"; do
|
2007-06-02 07:56:45 +00:00
|
|
|
# NPTL addon is not to be extracted, in any case
|
|
|
|
[ "${addon}" = "nptl" ] && continue || true
|
2010-01-12 18:24:03 +00:00
|
|
|
CT_Extract nochdir "glibc-${addon}-${CT_LIBC_VERSION}"
|
2009-03-15 20:50:40 +00:00
|
|
|
|
2009-01-05 23:02:43 +00:00
|
|
|
# Some addons have the 'long' name, while others have the
|
|
|
|
# 'short' name, but patches are non-uniformly built with
|
|
|
|
# either the 'long' or 'short' name, whatever the addons name
|
|
|
|
# so we have to make symlinks from the existing to the missing
|
|
|
|
# Fortunately for us, [ -d foo ], when foo is a symlink to a
|
|
|
|
# directory, returns true!
|
2010-01-11 21:47:58 +00:00
|
|
|
[ -d "${addon}" ] || CT_DoExecLog ALL ln -s "glibc-${addon}-${CT_LIBC_VERSION}" "${addon}"
|
|
|
|
[ -d "glibc-${addon}-${CT_LIBC_VERSION}" ] || CT_DoExecLog ALL ln -s "${addon}" "glibc-${addon}-${CT_LIBC_VERSION}"
|
2010-04-11 21:18:10 +00:00
|
|
|
CT_Patch nochdir "glibc" "${addon}-${CT_LIBC_VERSION}"
|
2007-05-07 09:04:02 +00:00
|
|
|
done
|
2007-05-07 15:57:02 +00:00
|
|
|
|
2008-09-28 21:34:11 +00:00
|
|
|
# The configure files may be older than the configure.in files
|
|
|
|
# if using a snapshot (or even some tarballs). Fake them being
|
|
|
|
# up to date.
|
2009-08-19 17:44:43 +00:00
|
|
|
sleep 2
|
2009-03-15 20:50:40 +00:00
|
|
|
find . -type f -name configure -exec touch {} \; 2>&1 |CT_DoLog ALL
|
|
|
|
|
|
|
|
CT_Popd
|
2008-09-28 21:34:11 +00:00
|
|
|
|
2007-05-07 15:57:02 +00:00
|
|
|
return 0
|
2007-05-07 09:04:02 +00:00
|
|
|
}
|
|
|
|
|
2007-02-24 11:00:05 +00:00
|
|
|
# There is nothing to do for glibc check config
|
|
|
|
do_libc_check_config() {
|
2007-05-08 10:52:39 +00:00
|
|
|
:
|
2007-02-24 11:00:05 +00:00
|
|
|
}
|