scripts/build/libfloat.sh
changeset 305 00a7e6c275da
parent 304 56b97558f14a
child 306 1984d7bcea28
     1.1 --- a/scripts/build/libfloat.sh	Mon Jul 30 19:35:39 2007 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,72 +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 -do_print_filename() {
    1.12 -    echo "libfloat-${CT_LIBFLOAT_VERSION}"
    1.13 -}
    1.14 -
    1.15 -# Download libfloat
    1.16 -do_libfloat_get() {
    1.17 -    # Ah! libfloat separates the version string from the base name with
    1.18 -    # an underscore. We need to workaround this in a sane manner: soft link.
    1.19 -    local libfloat_file=`echo "${CT_LIBFLOAT_FILE}" |sed -r -e 's/^libfloat-/libfloat_/;'`
    1.20 -    CT_GetFile "${libfloat_file}"                                    \
    1.21 -               ftp://ftp.de.debian.org/debian/pool/main/libf/libfloat
    1.22 -    CT_Pushd "${CT_TARBALLS_DIR}"
    1.23 -    ext=`CT_GetFileExtension "${libfloat_file}"`
    1.24 -    ln -vf "${libfloat_file}${ext}" "${CT_LIBFLOAT_FILE}${ext}" |CT_DoLog DEBUG
    1.25 -    CT_Popd
    1.26 -}
    1.27 -
    1.28 -# Extract libfloat
    1.29 -do_libfloat_extract() {
    1.30 -    CT_ExtractAndPatch "${CT_LIBFLOAT_FILE}"
    1.31 -}
    1.32 -
    1.33 -# Build libfloat
    1.34 -do_libfloat() {
    1.35 -    # Here we build and install libfloat for the target, so that the C library
    1.36 -    # builds OK with those versions of gcc that have severed softfloat support
    1.37 -    # code
    1.38 -    CT_DoStep INFO "Installing software floating point emulation library libfloat"
    1.39 -    CT_Pushd "${CT_BUILD_DIR}"
    1.40 -    mkdir -p build-libfloat
    1.41 -    cd build-libfloat
    1.42 -
    1.43 -    CT_DoLog EXTRA "Copying sources to build dir"
    1.44 -    ( cd "${CT_SRC_DIR}/${CT_LIBFLOAT_FILE}"; tar cf - . ) |tar xvf - |CT_DoLog ALL
    1.45 -
    1.46 -    CT_DoLog EXTRA "Cleaning library"
    1.47 -    make clean 2>&1 |CT_DoLog ALL
    1.48 -
    1.49 -    CT_DoLog EXTRA "Building library"
    1.50 -    make CROSS_COMPILE="${CT_TARGET}-" 2>&1 |CT_DoLog ALL
    1.51 -
    1.52 -    CT_DoLog EXTRA "Installing library"
    1.53 -    make DESTDIR="${CT_SYSROOT_DIR}" install    2>&1 |CT_DoLog ALL
    1.54 -
    1.55 -    CT_Popd
    1.56 -
    1.57 -    CT_EndStep
    1.58 -}
    1.59 -
    1.60 -else # "${CT_ARCH_FLOAT_SW_LIBFLOAT}" != "y"
    1.61 -
    1.62 -do_print_filename() {
    1.63 -    true
    1.64 -}
    1.65 -do_libfloat_get() {
    1.66 -    true
    1.67 -}
    1.68 -do_libfloat_extract() {
    1.69 -    true
    1.70 -}
    1.71 -do_libfloat() {
    1.72 -    true
    1.73 -}
    1.74 -
    1.75 -fi