scripts/build/tools/200-sstrip.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Nov 13 18:22:23 2008 +0000 (2008-11-13)
changeset 1041 2573519c00d6
parent 916 68af6b83ff7e
child 1112 c72aecd1a9ef
child 1166 685450d99823
permissions -rw-r--r--
Merge #1195, #1196 and #1203 from /devel/YEM-build_host_target_cleanup:
- Get rid of CT_CC_NATIVE
- Get rid of CT_CANADIAN_OPT
- Sanitise CT_BUILD vs. CT_HOST

/trunk/scripts/build/tools/200-sstrip.sh | 4 2 2 0
/trunk/scripts/build/binutils.sh | 1 0 1 0 -
/trunk/scripts/build/cc/gcc.sh | 11 6 5 0 +-
/trunk/scripts/build/debug/200-duma.sh | 3 1 2 0 -
/trunk/scripts/build/libc/glibc.sh | 10 5 5 0 +-
/trunk/scripts/build/libc/eglibc.sh | 8 4 4 0 +-
/trunk/scripts/crosstool.sh | 168 113 55 0 ++++++++++++++++++++++++++------------
/trunk/config/toolchain.in | 160 137 23 0 +++++++++++++++++++++++++++++++-----
8 files changed, 268 insertions(+), 97 deletions(-)
yann@479
     1
# This will build and install sstrip to run on host and sstrip target files
yann@479
     2
yann@479
     3
case "${CT_SSTRIP_FROM}" in
yann@479
     4
    ELFkickers)
yann@479
     5
        do_print_filename() {
yann@479
     6
            echo "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
yann@479
     7
        }
yann@479
     8
        do_tools_sstrip_get() {
yann@479
     9
            CT_GetFile "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"     \
yann@479
    10
                       http://www.muppetlabs.com/~breadbox/pub/software
yann@479
    11
        }
yann@479
    12
        do_tools_sstrip_extract() {
yann@479
    13
            CT_ExtractAndPatch "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
yann@479
    14
        }
yann@479
    15
        do_tools_sstrip_build() {
yann@479
    16
            CT_DoStep INFO "Installing sstrip"
yann@479
    17
            mkdir -p "${CT_BUILD_DIR}/build-strip"
yann@479
    18
            cd "${CT_BUILD_DIR}/build-strip"
yann@479
    19
            ( cd "${CT_SRC_DIR}/ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}/sstrip"; tar cf - . ) |tar xf -
yann@479
    20
yann@479
    21
            CT_DoLog EXTRA "Building sstrip"
yann@1041
    22
            CT_DoExecLog ALL make CC="${CT_HOST}-gcc" sstrip
yann@479
    23
            
yann@479
    24
            CT_DoLog EXTRA "Installing sstrip"
yann@669
    25
            CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
yann@479
    26
yann@479
    27
            CT_EndStep
yann@479
    28
        }
yann@479
    29
    ;;
yann@479
    30
yann@479
    31
    buildroot)
yann@479
    32
        do_print_filename() {
yann@479
    33
            echo "sstrip.c"
yann@479
    34
        }
yann@479
    35
        do_tools_sstrip_get() {
yann@713
    36
            # Note: the space between sstrip and .c is on purpose.
yann@713
    37
            CT_GetFile sstrip .c    \
yann@713
    38
                       "http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/buildroot/toolchain/sstrip/"
yann@479
    39
        }
yann@479
    40
        do_tools_sstrip_extract() {
yann@479
    41
            # We'll let buildroot guys take care of sstrip maintenance and patching.
yann@479
    42
            mkdir -p "${CT_SRC_DIR}/sstrip"
yann@669
    43
            CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
yann@479
    44
        }
yann@479
    45
        do_tools_sstrip_build() {
yann@479
    46
            CT_DoStep INFO "Installing sstrip"
yann@479
    47
            mkdir -p "${CT_BUILD_DIR}/build-sstrip"
yann@479
    48
            cd "${CT_BUILD_DIR}/build-sstrip"
yann@479
    49
yann@479
    50
            CT_DoLog EXTRA "Building sstrip"
yann@1041
    51
            CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c"
yann@479
    52
yann@479
    53
            CT_DoLog EXTRA "Installing sstrip"
yann@669
    54
            CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
yann@479
    55
yann@479
    56
            CT_EndStep
yann@479
    57
        }
yann@479
    58
    ;;
yann@479
    59
yann@479
    60
    *)  do_print_filename() {
yann@479
    61
            :
yann@479
    62
        }
yann@479
    63
        do_tools_sstrip_get() {
yann@479
    64
            :
yann@479
    65
        }
yann@479
    66
        do_tools_sstrip_extract() {
yann@479
    67
            :
yann@479
    68
        }
yann@479
    69
        do_tools_sstrip_build() {
yann@479
    70
            :
yann@479
    71
        }
yann@479
    72
    ;;
yann@479
    73
esac