summaryrefslogtreecommitdiff
path: root/scripts/build/libc_libfloat.sh
blob: 3828a3f0d0476bb3d0f7f519b034a72d5a5984a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# This file adds functions to build libfloat
# Copyright 2007 Yann E. MORIN
# Licensed under the GPL v2. See COPYING in the root of this package

do_libfloat() {
    # Here we build and install libfloat for the target, so that the C library
    # builds OK with those versions of gcc that have severed softfloat support
    # code
    [ "${CT_ARCH_FLOAT_SW_LIBFLOAT}" = "y" ] || return 0
	CT_DoStep INFO "Installing software floating point emulation library libfloat"

    CT_Pushd "${CT_BUILD_DIR}"
    CT_DoLog EXTRA "Copying sources to build dir"
    mkdir build-libfloat
    cd build-libfloat
    ( cd "${CT_SRC_DIR}/${CT_LIBFLOAT_FILE}"; tar cf - . ) |tar xvf - |CT_DoLog DEBUG

    CT_DoLog EXTRA "Cleaning library"
    make clean 2>&1 |CT_DoLog DEBUG

    CT_DoLog EXTRA "Building library"
    make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" 2>&1 |CT_DoLog DEBUG

    CT_DoLog EXTRA "Installing library"
    make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" \
         DESTDIR="${CT_SYSROOT_DIR}" install                       2>&1 |CT_DoLog DEBUG

    CT_Popd

    CT_EndStep
}