scripts/build/libfloat.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat May 19 22:52:47 2007 +0000 (2007-05-19)
changeset 108 69407950a2a2
parent 107 06d3636f6611
child 136 22b5ef41df97
permissions -rw-r--r--
Add uClibc-0.9.29:
- associated patch set
- update the munging function to accomodate the new config variables
libfloat version was missing from the previous commit... :-(
Better handle the case where the sample directory already exist but isn't under revision control, and in case the destination file doesn't exist in the sample directory.
     1 # This file adds functions to build libfloat
     2 # Copyright 2007 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 # Define libfloat functions depending on wether it is selected or not
     6 if [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ]; then
     7 
     8 # Download libfloat
     9 do_libfloat_get() {
    10     # Ah! libfloat separates the version string from the base name with
    11     # an underscore. We need to workaround this in a sane manner: soft link.
    12     local libfloat_file=`echo "${CT_LIBFLOAT_FILE}" |sed -r -e 's/^libfloat-/libfloat_/;'`
    13     CT_GetFile "${libfloat_file}"                                    \
    14                ftp://ftp.de.debian.org/debian/pool/main/libf/libfloat
    15     CT_Pushd "${CT_TARBALLS_DIR}"
    16     ext=`CT_GetFileExtension "${libfloat_file}"`
    17     ln -svf "${libfloat_file}${ext}" "${CT_LIBFLOAT_FILE}${ext}" |CT_DoLog DEBUG
    18     CT_Popd
    19 }
    20 
    21 # Extract libfloat
    22 do_libfloat_extract() {
    23     CT_ExtractAndPatch "${CT_LIBFLOAT_FILE}"
    24 }
    25 
    26 # Build libfloat
    27 do_libfloat() {
    28     # Here we build and install libfloat for the target, so that the C library
    29     # builds OK with those versions of gcc that have severed softfloat support
    30     # code
    31     CT_DoStep INFO "Installing software floating point emulation library libfloat"
    32     mkdir build-libfloat
    33     cd build-libfloat
    34 
    35     CT_Pushd "${CT_BUILD_DIR}"
    36     CT_DoLog EXTRA "Copying sources to build dir"
    37     ( cd "${CT_SRC_DIR}/${CT_LIBFLOAT_FILE}"; tar cf - . ) |tar xvf - |CT_DoLog ALL
    38 
    39     CT_DoLog EXTRA "Cleaning library"
    40     make clean 2>&1 |CT_DoLog ALL
    41 
    42     CT_DoLog EXTRA "Building library"
    43     make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" 2>&1 |CT_DoLog ALL
    44 
    45     CT_DoLog EXTRA "Installing library"
    46     make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" \
    47          DESTDIR="${CT_SYSROOT_DIR}" install                       2>&1 |CT_DoLog ALL
    48 
    49     CT_Popd
    50 
    51     CT_EndStep
    52 }
    53 
    54 else # "${CT_ARCH_FLOAT_SW_LIBFLOAT}" != "y"
    55 
    56 do_libfloat_get() {
    57     true
    58 }
    59 do_libfloat_extract() {
    60     true
    61 }
    62 do_libfloat() {
    63     true
    64 }
    65 
    66 fi