scripts/build/libfloat.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu May 17 16:22:51 2007 +0000 (2007-05-17)
changeset 96 aa1a9fbd6eb8
parent 78 c3868084d81a
child 107 06d3636f6611
permissions -rw-r--r--
Debug facilities:
- add a framework to easily add new ones
- add gdb as a first debug facility
- add patches for gdb
After the kernel checked its installed headers, clean up the mess of .checked.* files.
Reorder scripts/crosstool.sh:
- dump the configuration early
- renice early
- get info about build system early, when setting up the environment
- when in cross or native, the host tools are those of the build system, and only in this case
- elapsed time calculations moved to scripts/functions
Remove handling of the color: it's gone once and for all.
Update tools/addToolVersion.sh:
- handle debug facilities
- commonalise some code
- remove dead tools (cygwin, tcc)
Point to my address for bug reports.
     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     # Please note: because the file we download, and the file we store on the
    11     # file system don't have the same name, CT_GetFile will always try to
    12     # download the file over and over.
    13     # To avoid this, we check that the file we want already exists in the
    14     # tarball directory first. This is an ugly hack that overrides the standard
    15     # CT_GetFile behavior... Sight...
    16     lib_float_url="ftp://ftp.de.debian.org/debian/pool/main/libf/libfloat/"
    17     ext=`CT_GetFileExtension "${CT_LIBFLOAT_FILE}"`
    18     if [ -z "${ext}" ]; then
    19         CT_GetFile libfloat_990616.orig "${lib_float_url}"
    20         ext=`CT_GetFileExtension "libfloat_990616.orig"`
    21         # Hack: remove the .orig extension, and change _ to -
    22         mv -v "${CT_TARBALLS_DIR}/libfloat_990616.orig${ext}" \
    23               "${CT_TARBALLS_DIR}/libfloat-990616${ext}"      2>&1 |CT_DoLog DEBUG
    24     fi
    25 }
    26 
    27 # Extract libfloat
    28 do_libfloat_extract() {
    29     [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] && CT_ExtractAndPatch "${CT_LIBFLOAT_FILE}"
    30 }
    31 
    32 # Build libfloat
    33 do_libfloat() {
    34     # Here we build and install libfloat for the target, so that the C library
    35     # builds OK with those versions of gcc that have severed softfloat support
    36     # code
    37     [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] || return 0
    38 	CT_DoStep INFO "Installing software floating point emulation library libfloat"
    39 
    40     CT_Pushd "${CT_BUILD_DIR}"
    41     CT_DoLog EXTRA "Copying sources to build dir"
    42     mkdir build-libfloat
    43     cd build-libfloat
    44     ( cd "${CT_SRC_DIR}/${CT_LIBFLOAT_FILE}"; tar cf - . ) |tar xvf - |CT_DoLog ALL
    45 
    46     CT_DoLog EXTRA "Cleaning library"
    47     make clean 2>&1 |CT_DoLog ALL
    48 
    49     CT_DoLog EXTRA "Building library"
    50     make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" 2>&1 |CT_DoLog ALL
    51 
    52     CT_DoLog EXTRA "Installing library"
    53     make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" \
    54          DESTDIR="${CT_SYSROOT_DIR}" install                       2>&1 |CT_DoLog ALL
    55 
    56     CT_Popd
    57 
    58     CT_EndStep
    59 }
    60 
    61 else # "${CT_ARCH_FLOAT_SW_LIBFLOAT}" != "y"
    62 
    63 do_libfloat_get() {
    64     true
    65 }
    66 do_libfloat_extract() {
    67     true
    68 }
    69 do_libfloat() {
    70     true
    71 }
    72 
    73 fi