scripts/build/binutils.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 06 21:47:29 2007 +0000 (2007-05-06)
changeset 62 651912c5477c
child 63 89b41dbffe8d
permissions -rw-r--r--
Linux kernel headers install does not need the kernel to be configured. Dropping this unneccessary step.
     1 # This file adds functions to build binutils
     2 # Copyright 2007 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 do_binutils() {
     6     mkdir -p "${CT_BUILD_DIR}/build-binutils"
     7     cd "${CT_BUILD_DIR}/build-binutils"
     8 
     9     CT_DoStep INFO "Installing binutils"
    10 
    11     CT_DoLog EXTRA "Configuring binutils"
    12     CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
    13     "${CT_SRC_DIR}/${CT_BINUTILS_FILE}/configure"   \
    14         ${CT_CANADIAN_OPT}                          \
    15         --target=${CT_TARGET}                       \
    16         --host=${CT_HOST}                           \
    17         --prefix=${CT_PREFIX_DIR}                   \
    18         --disable-nls                               \
    19         ${CT_BINUTILS_EXTRA_CONFIG}                 \
    20         ${BINUTILS_SYSROOT_ARG}                     2>&1 |CT_DoLog DEBUG
    21 
    22     CT_DoLog EXTRA "Building binutils"
    23     make ${PARALLELMFLAGS}  2>&1 |CT_DoLog DEBUG
    24 
    25     CT_DoLog EXTRA "Installing binutils"
    26     make install            2>&1 |CT_DoLog DEBUG
    27 
    28     # Make those new tools available to the core C compiler to come:
    29     # Note: some components want the ${TARGET}-{ar,as,ld,strip} commands as
    30     # well. Create that (libfloat is one such sucker).
    31     mkdir -p "${CT_CC_CORE_PREFIX_DIR}/${CT_TARGET}/bin"
    32     mkdir -p "${CT_CC_CORE_PREFIX_DIR}/bin"
    33     for t in ar as ld strip; do
    34         ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_PREFIX_DIR}/${CT_TARGET}/bin/${t}"
    35         ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-${t}"
    36     done |CT_DoLog DEBUG
    37 
    38     CT_EndStep
    39 }