Build and install a uClibc cross-ldd.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Nov 17 18:46:09 2008 +0000 (2008-11-17)
changeset 10525581761d6e97
parent 1051 0d2177613476
child 1053 11f3795125e9
Build and install a uClibc cross-ldd.
Based on a patch by Joachim NILSSON: http://sourceware.org/ml/crossgcc/2008-11/msg00025.html

/trunk/scripts/build/libc/uClibc.sh | 28 27 1 0 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
scripts/build/libc/uClibc.sh
     1.1 --- a/scripts/build/libc/uClibc.sh	Mon Nov 17 10:26:45 2008 +0000
     1.2 +++ b/scripts/build/libc/uClibc.sh	Mon Nov 17 18:46:09 2008 +0000
     1.3 @@ -148,7 +148,33 @@
     1.4  
     1.5  # This function is used to install those components needing the final C compiler
     1.6  do_libc_finish() {
     1.7 -    :
     1.8 +    # Build and install host-side ldd
     1.9 +    CT_DoStep INFO "Finishing C library"
    1.10 +
    1.11 +    mkdir -p "${CT_BUILD_DIR}/build-libc-finish"
    1.12 +    cd "${CT_BUILD_DIR}/build-libc-finish"
    1.13 +
    1.14 +    # Simply copy files until uClibc has the ablity to build out-of-tree
    1.15 +    CT_DoLog EXTRA "Copying sources to build dir"
    1.16 +    { cd "${CT_SRC_DIR}/${CT_LIBC_FILE}"; tar cf - .; } |tar xf -
    1.17 +
    1.18 +    # Retrieve the config file
    1.19 +    cp "${CT_BUILD_DIR}/uClibc.config" .config
    1.20 +
    1.21 +    CT_DoLog EXTRA "Applying configuration"
    1.22 +    CT_DoYes "" |CT_DoExecLog ALL               \
    1.23 +                 make CROSS=${CT_TARGET}-       \
    1.24 +                 PREFIX="${CT_SYSROOT_DIR}/"    \
    1.25 +                 oldconfig
    1.26 +
    1.27 +    CT_DoLog EXTRA "Installing C library host utils"
    1.28 +    CT_DoExecLog ALL                    \
    1.29 +    make PREFIX="${CT_SYSROOT_DIR}/"    \
    1.30 +         ${CT_LIBC_UCLIBC_VERBOSITY}    \
    1.31 +         -C utils hostutils
    1.32 +    CT_DoExecLog ALL install -m 0755 utils/ldd.host "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ldd"
    1.33 +
    1.34 +    CT_EndStep
    1.35  }
    1.36  
    1.37  # Initialises the .config file to sensible values