scripts/build/binutils.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 63 89b41dbffe8d
child 116 c0846c936c07
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 binutils
     2 # Copyright 2007 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 # Download binutils
     6 do_binutils_get() {
     7     CT_GetFile "${CT_BINUTILS_FILE}"                            \
     8                ftp://ftp.gnu.org/gnu/binutils                   \
     9                ftp://ftp.kernel.org/pub/linux/devel/binutils
    10 }
    11 
    12 # Extract binutils
    13 do_binutils_extract() {
    14     CT_ExtractAndPatch "${CT_BINUTILS_FILE}"
    15 }
    16 
    17 # Build binutils
    18 do_binutils() {
    19     mkdir -p "${CT_BUILD_DIR}/build-binutils"
    20     cd "${CT_BUILD_DIR}/build-binutils"
    21 
    22     CT_DoStep INFO "Installing binutils"
    23 
    24     CT_DoLog EXTRA "Configuring binutils"
    25     CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
    26     "${CT_SRC_DIR}/${CT_BINUTILS_FILE}/configure"   \
    27         ${CT_CANADIAN_OPT}                          \
    28         --target=${CT_TARGET}                       \
    29         --host=${CT_HOST}                           \
    30         --prefix=${CT_PREFIX_DIR}                   \
    31         --disable-nls                               \
    32         ${CT_BINUTILS_EXTRA_CONFIG}                 \
    33         ${BINUTILS_SYSROOT_ARG}                     2>&1 |CT_DoLog ALL
    34 
    35     CT_DoLog EXTRA "Building binutils"
    36     make ${PARALLELMFLAGS}  2>&1 |CT_DoLog ALL
    37 
    38     CT_DoLog EXTRA "Installing binutils"
    39     make install            2>&1 |CT_DoLog ALL
    40 
    41     # Make those new tools available to the core C compiler to come:
    42     # Note: some components want the ${TARGET}-{ar,as,ld,strip} commands as
    43     # well. Create that (libfloat is one such sucker).
    44     mkdir -p "${CT_CC_CORE_PREFIX_DIR}/${CT_TARGET}/bin"
    45     mkdir -p "${CT_CC_CORE_PREFIX_DIR}/bin"
    46     for t in ar as ld strip; do
    47         ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_PREFIX_DIR}/${CT_TARGET}/bin/${t}"
    48         ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-${t}"
    49     done |CT_DoLog ALL
    50 
    51     CT_EndStep
    52 }