libc/glibc: no default mode for backend
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Dec 13 11:51:07 2011 +0100 (2011-12-13)
changeset 281948cefdec12eb
parent 2818 c8c61834a985
child 2820 8a836b6d6e8c
libc/glibc: no default mode for backend

The caller SHALL explicitly ask for a nmode, and not rely on a default mode.
That's what actually happens, so we can get rid of the default.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/build/libc/glibc-eglibc.sh-common
     1.1 --- a/scripts/build/libc/glibc-eglibc.sh-common	Fri Dec 30 21:43:10 2011 +0100
     1.2 +++ b/scripts/build/libc/glibc-eglibc.sh-common	Tue Dec 13 11:51:07 2011 +0100
     1.3 @@ -67,9 +67,9 @@
     1.4  
     1.5  # Usage: do_libc_backend param=value [...]
     1.6  #   Parameter           : Definition                            : Type      : Default
     1.7 -#   libc_mode           : 'startfiles' or 'final'               : string    : final
     1.8 +#   libc_mode           : 'startfiles' or 'final'               : string    : (none)
     1.9  do_libc_backend() {
    1.10 -    local libc_mode=final
    1.11 +    local libc_mode
    1.12      local src_dir="${CT_SRC_DIR}/${CT_LIBC}-${CT_LIBC_VERSION}"
    1.13      local extra_cc_args
    1.14      local -a extra_config
    1.15 @@ -81,11 +81,11 @@
    1.16          shift
    1.17      done
    1.18  
    1.19 -    if [ "${libc_mode}" = "startfiles" ]; then
    1.20 -        CT_DoStep INFO "Installing C library headers & start files"
    1.21 -    else # libc_mode = final
    1.22 -        CT_DoStep INFO "Installing C library"
    1.23 -    fi
    1.24 +    case "${libc_mode}" in
    1.25 +        startfiles) CT_DoStep INFO "Installing C library headers & start files";;
    1.26 +        final)      CT_DoStep INFO "Installing C library";;
    1.27 +        *)          CT_Abort "Unsupported (or unset) libc_mode='${libc_mode}'";;
    1.28 +    esac
    1.29      mkdir -p "${CT_BUILD_DIR}/build-libc-${libc_mode}"
    1.30      cd "${CT_BUILD_DIR}/build-libc-${libc_mode}"
    1.31