scripts/build/tools/200-sstrip.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Sep 30 18:19:18 2008 +0000 (2008-09-30)
changeset 892 187d34a9adf4
parent 713 e074abc50374
child 916 68af6b83ff7e
permissions -rw-r--r--
Better handle the second pass core gcc build, differentiating between gcc prior to 4.3 with gcc from 4.3.
Simplify detecting wether gcc is 4.3 and later, or older than 4.3 (we already know from .config).

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