scripts/build/libc/newlib.sh
changeset 2165 e67ab7a73b2f
parent 2154 250cdcc86441
child 2166 c1fe0639585a
     1.1 --- a/scripts/build/libc/newlib.sh	Fri Oct 22 22:02:57 2010 +0200
     1.2 +++ b/scripts/build/libc/newlib.sh	Sat Oct 23 00:54:46 2010 +0200
     1.3 @@ -59,6 +59,8 @@
     1.4  }
     1.5  
     1.6  do_libc_start_files() {
     1.7 +    local -a newlib_opts
     1.8 +
     1.9      CT_DoStep INFO "Installing C library"
    1.10  
    1.11      mkdir -p "${CT_BUILD_DIR}/build-libc"
    1.12 @@ -66,6 +68,18 @@
    1.13  
    1.14      CT_DoLog EXTRA "Configuring C library"
    1.15  
    1.16 +    if [ "${CT_LIBC_NEWLIB_IO_FLOAT}" = "y" ]; then
    1.17 +        newlib_opts+=( "--enable-newlib-io-float" )
    1.18 +        if [ "${CT_LIBC_NEWLIB_IO_LDBL}" = "y" ]; then
    1.19 +            newlib_opts+=( "--enable-newlib-io-long-double" )
    1.20 +        else
    1.21 +            newlib_opts+=( "--disable-newlib-io-long-double" )
    1.22 +        fi
    1.23 +    else
    1.24 +        newlib_opts+=( "--disable-newlib-io-float" )
    1.25 +        newlib_opts+=( "--disable-newlib-io-long-double" )
    1.26 +    fi
    1.27 +
    1.28      # Note: newlib handles the build/host/target a little bit differently
    1.29      # than one would expect:
    1.30      #   build  : not used
    1.31 @@ -79,7 +93,8 @@
    1.32      "${CT_SRC_DIR}/newlib-$(libc_newlib_version)/configure" \
    1.33          --host=${CT_BUILD}                              \
    1.34          --target=${CT_TARGET}                           \
    1.35 -        --prefix=${CT_PREFIX_DIR}
    1.36 +        --prefix=${CT_PREFIX_DIR}                       \
    1.37 +        "${newlib_opts[@]}"
    1.38  
    1.39      CT_DoLog EXTRA "Building C library"
    1.40      CT_DoExecLog ALL make ${PARALLELMFLAGS}