scripts/build/libc/glibc.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 29 19:24:41 2011 +0200 (2011-05-29)
changeset 2483 fa3a18f9abcf
parent 2482 af25723a794f
child 2496 cc9b84a83b34
permissions -rw-r--r--
libc/glibc: commonalise extraction btw glibc and eglibc

glibc and eglibc have a very similar extraction process, so it
makes sense to commonalise it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 # This file adds functions to build glibc
     2 # Copyright 2007 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 # Add the definitions common to glibc and eglibc
     6 #   do_libc_extract
     7 #   do_libc_start_files
     8 #   do_libc
     9 #   do_libc_finish
    10 #   do_libc_add_ons_list
    11 #   do_libc_min_kernel_config
    12 . "${CT_LIB_DIR}/scripts/build/libc/glibc-eglibc.sh-common"
    13 
    14 # Download glibc
    15 do_libc_get() {
    16     local date
    17     local version
    18     local -a addons_list
    19 
    20     addons_list=($(do_libc_add_ons_list " "))
    21 
    22     # Main source
    23     CT_GetFile "glibc-${CT_LIBC_VERSION}"               \
    24                {ftp,http}://ftp.gnu.org/gnu/glibc       \
    25                ftp://gcc.gnu.org/pub/glibc/releases     \
    26                ftp://gcc.gnu.org/pub/glibc/snapshots
    27 
    28     # C library addons
    29     for addon in "${addons_list[@]}"; do
    30         # NPTL addon is not to be downloaded, in any case
    31         [ "${addon}" = "nptl" ] && continue || true
    32         CT_GetFile "glibc-${addon}-${CT_LIBC_VERSION}"      \
    33                    {ftp,http}://ftp.gnu.org/gnu/glibc       \
    34                    ftp://gcc.gnu.org/pub/glibc/releases     \
    35                    ftp://gcc.gnu.org/pub/glibc/snapshots
    36     done
    37 
    38     return 0
    39 }
    40 
    41 # There is nothing to do for glibc check config
    42 do_libc_check_config() {
    43     :
    44 }