libfloat is a component by itself, not a sup-part of the C library.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed May 09 18:55:35 2007 +0000 (2007-05-09)
changeset 83286b5a6938ac
parent 82 a1c93f975268
child 84 dcb02306a338
libfloat is a component by itself, not a sup-part of the C library.
scripts/build/libc_libfloat.sh
scripts/build/libfloat.sh
scripts/crosstool.sh
     1.1 --- a/scripts/build/libc_libfloat.sh	Wed May 09 13:11:04 2007 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,73 +0,0 @@
     1.4 -# This file adds functions to build libfloat
     1.5 -# Copyright 2007 Yann E. MORIN
     1.6 -# Licensed under the GPL v2. See COPYING in the root of this package
     1.7 -
     1.8 -# Define libfloat functions depending on wether it is selected or not
     1.9 -if [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ]; then
    1.10 -
    1.11 -# Download libfloat
    1.12 -do_libfloat_get() {
    1.13 -    # Please note: because the file we download, and the file we store on the
    1.14 -    # file system don't have the same name, CT_GetFile will always try to
    1.15 -    # download the file over and over.
    1.16 -    # To avoid this, we check that the file we want already exists in the
    1.17 -    # tarball directory first. This is an ugly hack that overrides the standard
    1.18 -    # CT_GetFile behavior... Sight...
    1.19 -    lib_float_url="ftp://ftp.de.debian.org/debian/pool/main/libf/libfloat/"
    1.20 -    ext=`CT_GetFileExtension "${CT_LIBFLOAT_FILE}"`
    1.21 -    if [ -z "${ext}" ]; then
    1.22 -        CT_GetFile libfloat_990616.orig "${lib_float_url}"
    1.23 -        ext=`CT_GetFileExtension "libfloat_990616.orig"`
    1.24 -        # Hack: remove the .orig extension, and change _ to -
    1.25 -        mv -v "${CT_TARBALLS_DIR}/libfloat_990616.orig${ext}" \
    1.26 -              "${CT_TARBALLS_DIR}/libfloat-990616${ext}"      2>&1 |CT_DoLog DEBUG
    1.27 -    fi
    1.28 -}
    1.29 -
    1.30 -# Extract libfloat
    1.31 -do_libfloat_extract() {
    1.32 -    [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] && CT_ExtractAndPatch "${CT_LIBFLOAT_FILE}"
    1.33 -}
    1.34 -
    1.35 -# Build libfloat
    1.36 -do_libfloat() {
    1.37 -    # Here we build and install libfloat for the target, so that the C library
    1.38 -    # builds OK with those versions of gcc that have severed softfloat support
    1.39 -    # code
    1.40 -    [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] || return 0
    1.41 -	CT_DoStep INFO "Installing software floating point emulation library libfloat"
    1.42 -
    1.43 -    CT_Pushd "${CT_BUILD_DIR}"
    1.44 -    CT_DoLog EXTRA "Copying sources to build dir"
    1.45 -    mkdir build-libfloat
    1.46 -    cd build-libfloat
    1.47 -    ( cd "${CT_SRC_DIR}/${CT_LIBFLOAT_FILE}"; tar cf - . ) |tar xvf - |CT_DoLog ALL
    1.48 -
    1.49 -    CT_DoLog EXTRA "Cleaning library"
    1.50 -    make clean 2>&1 |CT_DoLog ALL
    1.51 -
    1.52 -    CT_DoLog EXTRA "Building library"
    1.53 -    make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" 2>&1 |CT_DoLog ALL
    1.54 -
    1.55 -    CT_DoLog EXTRA "Installing library"
    1.56 -    make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" \
    1.57 -         DESTDIR="${CT_SYSROOT_DIR}" install                       2>&1 |CT_DoLog ALL
    1.58 -
    1.59 -    CT_Popd
    1.60 -
    1.61 -    CT_EndStep
    1.62 -}
    1.63 -
    1.64 -else # "${CT_ARCH_FLOAT_SW_LIBFLOAT}" != "y"
    1.65 -
    1.66 -do_libfloat_get() {
    1.67 -    true
    1.68 -}
    1.69 -do_libfloat_extract() {
    1.70 -    true
    1.71 -}
    1.72 -do_libfloat() {
    1.73 -    true
    1.74 -}
    1.75 -
    1.76 -fi
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/scripts/build/libfloat.sh	Wed May 09 18:55:35 2007 +0000
     2.3 @@ -0,0 +1,73 @@
     2.4 +# This file adds functions to build libfloat
     2.5 +# Copyright 2007 Yann E. MORIN
     2.6 +# Licensed under the GPL v2. See COPYING in the root of this package
     2.7 +
     2.8 +# Define libfloat functions depending on wether it is selected or not
     2.9 +if [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ]; then
    2.10 +
    2.11 +# Download libfloat
    2.12 +do_libfloat_get() {
    2.13 +    # Please note: because the file we download, and the file we store on the
    2.14 +    # file system don't have the same name, CT_GetFile will always try to
    2.15 +    # download the file over and over.
    2.16 +    # To avoid this, we check that the file we want already exists in the
    2.17 +    # tarball directory first. This is an ugly hack that overrides the standard
    2.18 +    # CT_GetFile behavior... Sight...
    2.19 +    lib_float_url="ftp://ftp.de.debian.org/debian/pool/main/libf/libfloat/"
    2.20 +    ext=`CT_GetFileExtension "${CT_LIBFLOAT_FILE}"`
    2.21 +    if [ -z "${ext}" ]; then
    2.22 +        CT_GetFile libfloat_990616.orig "${lib_float_url}"
    2.23 +        ext=`CT_GetFileExtension "libfloat_990616.orig"`
    2.24 +        # Hack: remove the .orig extension, and change _ to -
    2.25 +        mv -v "${CT_TARBALLS_DIR}/libfloat_990616.orig${ext}" \
    2.26 +              "${CT_TARBALLS_DIR}/libfloat-990616${ext}"      2>&1 |CT_DoLog DEBUG
    2.27 +    fi
    2.28 +}
    2.29 +
    2.30 +# Extract libfloat
    2.31 +do_libfloat_extract() {
    2.32 +    [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] && CT_ExtractAndPatch "${CT_LIBFLOAT_FILE}"
    2.33 +}
    2.34 +
    2.35 +# Build libfloat
    2.36 +do_libfloat() {
    2.37 +    # Here we build and install libfloat for the target, so that the C library
    2.38 +    # builds OK with those versions of gcc that have severed softfloat support
    2.39 +    # code
    2.40 +    [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] || return 0
    2.41 +	CT_DoStep INFO "Installing software floating point emulation library libfloat"
    2.42 +
    2.43 +    CT_Pushd "${CT_BUILD_DIR}"
    2.44 +    CT_DoLog EXTRA "Copying sources to build dir"
    2.45 +    mkdir build-libfloat
    2.46 +    cd build-libfloat
    2.47 +    ( cd "${CT_SRC_DIR}/${CT_LIBFLOAT_FILE}"; tar cf - . ) |tar xvf - |CT_DoLog ALL
    2.48 +
    2.49 +    CT_DoLog EXTRA "Cleaning library"
    2.50 +    make clean 2>&1 |CT_DoLog ALL
    2.51 +
    2.52 +    CT_DoLog EXTRA "Building library"
    2.53 +    make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" 2>&1 |CT_DoLog ALL
    2.54 +
    2.55 +    CT_DoLog EXTRA "Installing library"
    2.56 +    make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" \
    2.57 +         DESTDIR="${CT_SYSROOT_DIR}" install                       2>&1 |CT_DoLog ALL
    2.58 +
    2.59 +    CT_Popd
    2.60 +
    2.61 +    CT_EndStep
    2.62 +}
    2.63 +
    2.64 +else # "${CT_ARCH_FLOAT_SW_LIBFLOAT}" != "y"
    2.65 +
    2.66 +do_libfloat_get() {
    2.67 +    true
    2.68 +}
    2.69 +do_libfloat_extract() {
    2.70 +    true
    2.71 +}
    2.72 +do_libfloat() {
    2.73 +    true
    2.74 +}
    2.75 +
    2.76 +fi
     3.1 --- a/scripts/crosstool.sh	Wed May 09 13:11:04 2007 +0000
     3.2 +++ b/scripts/crosstool.sh	Wed May 09 18:55:35 2007 +0000
     3.3 @@ -306,7 +306,7 @@
     3.4  # export any variable, nor re-parse the configuration and functions files.
     3.5  . "${CT_TOP_DIR}/scripts/build/kernel_${CT_KERNEL}.sh"
     3.6  . "${CT_TOP_DIR}/scripts/build/binutils.sh"
     3.7 -. "${CT_TOP_DIR}/scripts/build/libc_libfloat.sh"
     3.8 +. "${CT_TOP_DIR}/scripts/build/libfloat.sh"
     3.9  . "${CT_TOP_DIR}/scripts/build/libc_${CT_LIBC}.sh"
    3.10  . "${CT_TOP_DIR}/scripts/build/cc_core_${CT_CC_CORE}.sh"
    3.11  . "${CT_TOP_DIR}/scripts/build/cc_${CT_CC}.sh"