scripts/build/binutils.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Apr 18 22:16:28 2008 +0000 (2008-04-18)
changeset 451 8a72f9bcf675
parent 305 00a7e6c275da
child 458 17f3122a2864
permissions -rw-r--r--
Using SOCKS 4/5 proxy is no easy task:
- a machine may well be able to reach the proxy, even if it is not on the same sub-net(s) as the machine itself (absolutely legitimate)
- tsocks.conf needs a list of so-called 'local' networks that can be reached without the need for a SOCKS connection
- SOCKS proxies are expected to be in 'local' networks
- there is absolutely NO way to tell what networks are local, besides the sub-net(s) the machine is in

Therefore, appropriate configuration of SOCKS 4/5 configuration is really complex, and attempts to correctly overcome this issue are doomed.

/trunk/scripts/crosstool.sh | 52 46 6 0 ++++++++++++++++++++++++++++++++++----
/trunk/config/global/download_extract.in | 39 31 8 0 +++++++++++++++++++++++------
2 files changed, 77 insertions(+), 14 deletions(-)
yann@1
     1
# This file adds functions to build binutils
yann@1
     2
# Copyright 2007 Yann E. MORIN
yann@1
     3
# Licensed under the GPL v2. See COPYING in the root of this package
yann@1
     4
yann@161
     5
do_print_filename() {
yann@164
     6
    echo "binutils-${CT_BINUTILS_VERSION}"
yann@161
     7
}
yann@161
     8
yann@63
     9
# Download binutils
yann@63
    10
do_binutils_get() {
yann@63
    11
    CT_GetFile "${CT_BINUTILS_FILE}"                            \
yann@63
    12
               ftp://ftp.gnu.org/gnu/binutils                   \
yann@63
    13
               ftp://ftp.kernel.org/pub/linux/devel/binutils
yann@63
    14
}
yann@63
    15
yann@63
    16
# Extract binutils
yann@63
    17
do_binutils_extract() {
yann@63
    18
    CT_ExtractAndPatch "${CT_BINUTILS_FILE}"
yann@63
    19
}
yann@63
    20
yann@63
    21
# Build binutils
yann@1
    22
do_binutils() {
yann@1
    23
    mkdir -p "${CT_BUILD_DIR}/build-binutils"
yann@1
    24
    cd "${CT_BUILD_DIR}/build-binutils"
yann@1
    25
yann@1
    26
    CT_DoStep INFO "Installing binutils"
yann@1
    27
yann@1
    28
    CT_DoLog EXTRA "Configuring binutils"
yann@1
    29
    CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
yann@1
    30
    "${CT_SRC_DIR}/${CT_BINUTILS_FILE}/configure"   \
yann@1
    31
        ${CT_CANADIAN_OPT}                          \
yann@116
    32
        --build=${CT_BUILD}                         \
yann@116
    33
        --host=${CT_HOST}                           \
yann@1
    34
        --target=${CT_TARGET}                       \
yann@1
    35
        --prefix=${CT_PREFIX_DIR}                   \
yann@1
    36
        --disable-nls                               \
yann@1
    37
        ${CT_BINUTILS_EXTRA_CONFIG}                 \
yann@78
    38
        ${BINUTILS_SYSROOT_ARG}                     2>&1 |CT_DoLog ALL
yann@1
    39
yann@1
    40
    CT_DoLog EXTRA "Building binutils"
yann@78
    41
    make ${PARALLELMFLAGS}  2>&1 |CT_DoLog ALL
yann@1
    42
yann@1
    43
    CT_DoLog EXTRA "Installing binutils"
yann@78
    44
    make install            2>&1 |CT_DoLog ALL
yann@1
    45
yann@331
    46
    # Make those new tools available to the core C compilers to come.
yann@1
    47
    # Note: some components want the ${TARGET}-{ar,as,ld,strip} commands as
yann@305
    48
    # well. Create that.
yann@136
    49
    mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}/${CT_TARGET}/bin"
yann@136
    50
    mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}/bin"
yann@136
    51
    mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}/${CT_TARGET}/bin"
yann@136
    52
    mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}/bin"
yann@1
    53
    for t in ar as ld strip; do
yann@136
    54
        ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_STATIC_PREFIX_DIR}/${CT_TARGET}/bin/${t}"
yann@136
    55
        ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_STATIC_PREFIX_DIR}/bin/${CT_TARGET}-${t}"
yann@136
    56
        ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_SHARED_PREFIX_DIR}/${CT_TARGET}/bin/${t}"
yann@136
    57
        ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_SHARED_PREFIX_DIR}/bin/${CT_TARGET}-${t}"
yann@78
    58
    done |CT_DoLog ALL
yann@1
    59
yann@1
    60
    CT_EndStep
yann@1
    61
}