libc/glibc: get rid of the now obsolete CVS stuff

It's now been a while that glibc switched to git from cvs.
Get rid of cvs to download glibc; this will make for a good
cleanup before we add git support! :-)
This commit is contained in:
Yann E. MORIN" 2010-01-11 22:47:58 +01:00
parent 494bcf3751
commit c5462c814f
3 changed files with 34 additions and 95 deletions

View File

@ -84,10 +84,12 @@ config LIBC_ADDONS_LIST
Eg.: crypt (for very old libces)
if LIBC_GLIBC_2_8_or_later && ( LIBC_GLIBC_USE_PORTS || ( LIBC_ADDONS_LIST != "" ) )
comment "WARNING!!!"
comment "For glibc >= 2.8, addons are only available via a CVS checkout."
comment "Be sure to review the associated options, above."
if LIBC_GLIBC_USE_PORTS || ( LIBC_ADDONS_LIST != "" )
comment "WARNING !!! "
comment "| For glibc >= 2.8, it can happen that the tarballs "
comment "| for the addons are not available for download. "
comment "| If that happens, bad luck... Try a previous version "
comment "| or try again later... :-( "
endif
if KERNEL_linux

View File

@ -33,12 +33,10 @@ config LIBC_V_2_10_1
config LIBC_V_2_9
bool
prompt "2.9"
select LIBC_GLIBC_2_8_or_later
config LIBC_V_2_8
bool
prompt "2.8"
select LIBC_GLIBC_2_8_or_later
config LIBC_V_2_7
bool
@ -88,10 +86,6 @@ config LIBC_VERSION
default "2.5" if LIBC_V_2_5
default "2.3.6" if LIBC_V_2_3_6
config LIBC_GLIBC_2_8_or_later
bool
default n
choice
bool
prompt "Retrieval method"
@ -100,7 +94,6 @@ choice
config LIBC_GLIBC_TARBALL
bool
prompt "Released tarball"
depends on ! LIBC_GLIBC_2_8_or_later || ! ( LIBC_GLIBC_USE_PORTS || ( LIBC_ADDONS_LIST != "" ) )
help
Until end of Februrary 2009, there was no tarball for glibc releases
2.8 and later. This was intentional.
@ -119,25 +112,4 @@ config LIBC_GLIBC_TARBALL
If you can live with a moving code-base, look at the other choice
entries, below.
config LIBC_GLIBC_CVS
bool
prompt "CVS checkout"
help
See the help for the entry "Released tarball", above.
If you can live with a moving code-base, say 'Y' here.
If you want your toolchain to really be reproducible, look at the
choice entry "Released tarball from FTP", above.
if LIBC_GLIBC_CVS
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.
endif # LIBC_GLIBC_CVS
endchoice

View File

@ -10,67 +10,41 @@ do_libc_get() {
addons_list=($(do_libc_add_ons_list " "))
if [ "${CT_LIBC_GLIBC_TARBALL}" = "y" ]; then
# Use release tarballs
CT_GetFile "glibc-${CT_LIBC_VERSION}" \
# 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}" \
{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}" \
{ftp,http}://ftp.gnu.org/gnu/glibc \
ftp://gcc.gnu.org/pub/glibc/releases \
ftp://gcc.gnu.org/pub/glibc/snapshots
done
elif [ "${CT_LIBC_GLIBC_CVS}" = "y" ]; then
# Use CVS checkout
version="${CT_LIBC_VERSION//./_}"
date="${CT_LIBC_GLIBC_CVS_date}"
CT_GetCVS "glibc-cvs-${CT_LIBC_VERSION}" \
":pserver:anoncvs@sources.redhat.com:/cvs/glibc" \
"libc" \
"glibc-${version}-branch${date:+:}${date}" \
"glibc-cvs-${CT_LIBC_VERSION}"
# C library addons
for addon in "${addons_list[@]}"; do
# NPTL addon is not to be downloaded, in any case
[ "${addon}" = "nptl" ] && continue || true
CT_GetCVS "glibc-${addon}-cvs-${CT_LIBC_VERSION}" \
":pserver:anoncvs@sources.redhat.com:/cvs/glibc" \
"${addon}" \
"glibc-${version}-branch${date:+:}${date}" \
"glibc-${addon}-cvs-${CT_LIBC_VERSION}"
done
fi
done
return 0
}
# Extract glibc
do_libc_extract() {
local cvs
local -a addons_list
addons_list=($(do_libc_add_ons_list " "))
[ "${CT_LIBC_GLIBC_CVS}" = "y" ] && cvs="cvs-"
CT_Extract "glibc-${CT_LIBC_VERSION}"
CT_Extract "glibc-${cvs}${CT_LIBC_VERSION}"
CT_Pushd "${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}"
CT_Pushd "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}"
CT_Patch "glibc-${CT_LIBC_VERSION}" nochdir
# C library addons
for addon in "${addons_list[@]}"; do
# NPTL addon is not to be extracted, in any case
[ "${addon}" = "nptl" ] && continue || true
CT_Extract "glibc-${addon}-${cvs}${CT_LIBC_VERSION}" nochdir
CT_Extract "glibc-${addon}-${CT_LIBC_VERSION}" nochdir
# Some addons have the 'long' name, while others have the
# 'short' name, but patches are non-uniformly built with
@ -78,8 +52,8 @@ do_libc_extract() {
# 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!
[ -d "${addon}" ] || CT_DoExecLog ALL ln -s "glibc-${addon}-${cvs}${CT_LIBC_VERSION}" "${addon}"
[ -d "glibc-${addon}-${cvs}${CT_LIBC_VERSION}" ] || CT_DoExecLog ALL ln -s "${addon}" "glibc-${addon}-${cvs}${CT_LIBC_VERSION}"
[ -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}"
CT_Patch "glibc-${addon}-${CT_LIBC_VERSION}" nochdir
done
@ -101,14 +75,11 @@ do_libc_check_config() {
# This function installs the glibc headers needed to build the core compiler
do_libc_headers() {
local cvs
local -a extra_config
local arch4hdrs
CT_DoStep INFO "Installing C library headers"
[ "${CT_LIBC_GLIBC_CVS}" = "y" ] && cvs="cvs-"
mkdir -p "${CT_BUILD_DIR}/build-libc-headers"
cd "${CT_BUILD_DIR}/build-libc-headers"
@ -160,7 +131,7 @@ do_libc_headers() {
libc_cv_mlong_double_128ibm=yes \
CC=${cross_cc} \
CT_DoExecLog ALL \
"${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/configure" \
"${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/configure" \
--build="${CT_BUILD}" \
--host="${CT_TARGET}" \
--prefix=/usr \
@ -173,7 +144,7 @@ do_libc_headers() {
CT_DoLog EXTRA "Installing C library headers"
if grep -q GLIBC_2.3 "${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/ChangeLog"; then
if grep -q GLIBC_2.3 "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/ChangeLog"; then
# glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c,
# which fails without a real cross-compiler.
# Fortunately, we don't need errlist-compat.c, since we just need .h
@ -216,7 +187,7 @@ do_libc_headers() {
# See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
mkdir -p "${CT_HEADERS_DIR}/gnu"
CT_DoExecLog ALL touch "${CT_HEADERS_DIR}/gnu/stubs.h"
CT_DoExecLog ALL cp -v "${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/include/features.h" \
CT_DoExecLog ALL cp -v "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/include/features.h" \
"${CT_HEADERS_DIR}/features.h"
# Building the bootstrap gcc requires either setting inhibit_libc, or
@ -231,20 +202,20 @@ do_libc_headers() {
[ "${CT_ARCH}" != "arm" ] && CT_DoExecLog ALL cp -v misc/syscall-list.h "${CT_HEADERS_DIR}/bits/syscall.h" || true
# Those headers are to be manually copied so gcc can build properly
pthread_h="${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/${CT_THREADS}/sysdeps/pthread/pthread.h"
pthread_h="${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/${CT_THREADS}/sysdeps/pthread/pthread.h"
pthreadtypes_h=
case "${CT_THREADS}" in
nptl)
# NOTE: for some archs, the pathes are different, but they are not
# supported by crosstool-NG right now. See original crosstool when they are.
pthread_h="${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/${CT_THREADS}/sysdeps/pthread/pthread.h"
pthreadtypes_h="${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/nptl/sysdeps/unix/sysv/linux/${arch4hdrs}/bits/pthreadtypes.h"
pthread_h="${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/${CT_THREADS}/sysdeps/pthread/pthread.h"
pthreadtypes_h="${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/nptl/sysdeps/unix/sysv/linux/${arch4hdrs}/bits/pthreadtypes.h"
if [ ! -f "${pthreadtypes_h}" ]; then
pthreadtypes_h="${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/ports/sysdeps/unix/sysv/linux/${arch4hdrs}/nptl/bits/pthreadtypes.h"
pthreadtypes_h="${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/ports/sysdeps/unix/sysv/linux/${arch4hdrs}/nptl/bits/pthreadtypes.h"
fi
;;
linuxthreads)
pthreadtypes_h="${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h"
pthreadtypes_h="${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h"
;;
*)
pthread_h=
@ -263,7 +234,6 @@ do_libc_headers() {
# Build and install start files
do_libc_start_files() {
local cvs
local -a extra_config
# Needed only in the NPTL case. Otherwise, return.
@ -271,8 +241,6 @@ do_libc_start_files() {
CT_DoStep INFO "Installing C library start files"
[ "${CT_LIBC_GLIBC_CVS}" = "y" ] && cvs="cvs-"
mkdir -p "${CT_BUILD_DIR}/build-libc-startfiles"
cd "${CT_BUILD_DIR}/build-libc-startfiles"
@ -332,7 +300,7 @@ do_libc_start_files() {
AR=${CT_TARGET}-ar \
RANLIB=${CT_TARGET}-ranlib \
CT_DoExecLog ALL \
"${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/configure" \
"${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/configure" \
--prefix=/usr \
--build="${CT_BUILD}" \
--host=${CT_TARGET} \
@ -364,13 +332,10 @@ do_libc_start_files() {
# This function builds and install the full glibc
do_libc() {
local cvs
local -a extra_config
CT_DoStep INFO "Installing C library"
[ "${CT_LIBC_GLIBC_CVS}" = "y" ] && cvs="cvs-"
mkdir -p "${CT_BUILD_DIR}/build-libc"
cd "${CT_BUILD_DIR}/build-libc"
@ -458,7 +423,7 @@ do_libc() {
AR=${CT_TARGET}-ar \
RANLIB=${CT_TARGET}-ranlib \
CT_DoExecLog ALL \
"${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/configure" \
"${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/configure" \
--prefix=/usr \
--build=${CT_BUILD} \
--host=${CT_TARGET} \
@ -472,7 +437,7 @@ do_libc() {
"${extra_config[@]}" \
${CT_LIBC_GLIBC_EXTRA_CONFIG}
if grep -l '^install-lib-all:' "${CT_SRC_DIR}/glibc-${cvs}${CT_LIBC_VERSION}/Makerules" > /dev/null; then
if grep -l '^install-lib-all:' "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/Makerules" > /dev/null; then
# nptl-era glibc.
# If the install-lib-all target (which is added by our make-install-lib-all.patch)
# is present, it means we're building glibc-2.3.3 or later, and we can't