scripts/build/libc/eglibc.sh
branchbash_array
changeset 1772 a13e3513bcba
parent 1476 eded63022651
child 1528 f87b08efe892
     1.1 --- a/scripts/build/libc/eglibc.sh	Mon Jul 27 22:16:07 2009 +0200
     1.2 +++ b/scripts/build/libc/eglibc.sh	Sun Jan 31 13:11:14 2010 +0100
     1.3 @@ -201,6 +201,8 @@
     1.4  
     1.5  # This function builds and install the full glibc
     1.6  do_libc() {
     1.7 +    local -a extra_config
     1.8 +
     1.9      CT_DoStep INFO "Installing C library"
    1.10  
    1.11      mkdir -p "${CT_BUILD_DIR}/build-libc"
    1.12 @@ -212,32 +214,32 @@
    1.13      # We don't need to be conditional on wether the user did set different
    1.14      # values, as they CT_LIBC_GLIBC_EXTRA_CONFIG is passed after extra_config
    1.15  
    1.16 -    extra_config="--enable-kernel=$(echo ${CT_LIBC_GLIBC_MIN_KERNEL} |sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;')"
    1.17 +    extra_config+=("--enable-kernel=$(echo ${CT_LIBC_GLIBC_MIN_KERNEL} |sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;')")
    1.18  
    1.19      case "${CT_THREADS}" in
    1.20 -        nptl)           extra_config="${extra_config} --with-__thread --with-tls";;
    1.21 -        linuxthreads)   extra_config="${extra_config} --with-__thread --without-tls --without-nptl";;
    1.22 -        none)           extra_config="${extra_config} --without-__thread --without-nptl"
    1.23 +        nptl)           extra_config+=("--with-__thread" "--with-tls");;
    1.24 +        linuxthreads)   extra_config+=("--with-__thread" "--without-tls" "--without-nptl");;
    1.25 +        none)           extra_config+=("--without-__thread" "--without-nptl")
    1.26                          case "${CT_LIBC_GLIBC_EXTRA_CONFIG}" in
    1.27                              *-tls*) ;;
    1.28 -                            *) extra_config="${extra_config} --without-tls";;
    1.29 +                            *) extra_config+=("--without-tls");;
    1.30                          esac
    1.31                          ;;
    1.32      esac
    1.33  
    1.34      case "${CT_SHARED_LIBS}" in
    1.35 -        y) extra_config="${extra_config} --enable-shared";;
    1.36 -        *) extra_config="${extra_config} --disable-shared";;
    1.37 +        y) extra_config+=("--enable-shared");;
    1.38 +        *) extra_config+=("--disable-shared");;
    1.39      esac
    1.40  
    1.41      case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in
    1.42 -        y,) extra_config="${extra_config} --with-fp";;
    1.43 -        ,y) extra_config="${extra_config} --without-fp";;
    1.44 +        y,) extra_config+=("--with-fp");;
    1.45 +        ,y) extra_config+=("--without-fp");;
    1.46      esac
    1.47  
    1.48      case "$(do_libc_add_ons_list ,)" in
    1.49          "") ;;
    1.50 -        *)  extra_config="${extra_config} --enable-add-ons=$(do_libc_add_ons_list ,)";;
    1.51 +        *)  extra_config+=("--enable-add-ons=$(do_libc_add_ons_list ,)");;
    1.52      esac
    1.53  
    1.54      extra_cc_args="${extra_cc_args} ${CT_ARCH_ENDIAN_OPT}"
    1.55 @@ -246,7 +248,7 @@
    1.56  
    1.57      CT_DoLog DEBUG "Using gcc for target:     '${cross_cc}'"
    1.58      CT_DoLog DEBUG "Configuring with addons : '$(do_libc_add_ons_list ,)'"
    1.59 -    CT_DoLog DEBUG "Extra config args passed: '${extra_config}'"
    1.60 +    CT_DoLog DEBUG "Extra config args passed: '${extra_config[*]}'"
    1.61      CT_DoLog DEBUG "Extra CC args passed    : '${extra_cc_args}'"
    1.62  
    1.63      BUILD_CC="${CT_BUILD}-gcc"                                      \
    1.64 @@ -263,7 +265,7 @@
    1.65          --disable-profile                                           \
    1.66          --without-gd                                                \
    1.67          --without-cvs                                               \
    1.68 -        ${extra_config}                                             \
    1.69 +        "${extra_config[@]}"                                        \
    1.70          ${CT_LIBC_GLIBC_EXTRA_CONFIG}
    1.71      
    1.72      CT_DoLog EXTRA "Building C library"