scripts/build/binutils/sstrip.sh
author Remy Bohmer <linux@bohmer.net>
Sun Jul 11 22:23:34 2010 +0200 (2010-07-11)
changeset 2021 3e52a1510f87
parent 1856 e23ffb5c7928
child 2324 68ec66ee2ff9
permissions -rw-r--r--
debug/gdb: Fix compilation for Mingw hosts

GDB requires PDcurses instead of ncurses while running on Windows.
So, do not always compile ncurses in case GDB needs to build.

PDcurses is provided by an earlier build step and is not described in
this file.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
[yann.morin.1998@anciense.nib.fr: we already have a way to detect ncurses usage]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@479
     1
# This will build and install sstrip to run on host and sstrip target files
yann@479
     2
yann@1858
     3
do_sstrip_get() { :; }
yann@1858
     4
do_sstrip_extract() { :; }
yann@1858
     5
do_sstrip() { :; }
yann@1854
     6
yann@1856
     7
if [ "${CT_SSTRIP}" = "y" ]; then
yann@1856
     8
    do_sstrip_get() {
yann@1856
     9
        CT_GetFile sstrip .c http://git.buildroot.net/buildroot/plain/toolchain/sstrip
yann@1856
    10
    }
yann@479
    11
yann@1856
    12
    do_sstrip_extract() {
yann@1856
    13
        # We leave the sstrip maintenance to the buildroot people:
yann@1856
    14
        # -> any fix-up goes directly there
yann@1856
    15
        # -> we don't have patches for it
yann@1856
    16
        # -> we don't need to patch it
yann@1856
    17
        # -> just create a directory in src/, and copy it there.
yann@1856
    18
        CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/sstrip"
yann@1856
    19
        CT_DoExecLog DEBUG cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
yann@1856
    20
    }
yann@479
    21
yann@1856
    22
    do_sstrip() {
yann@1856
    23
        CT_DoStep INFO "Installing sstrip"
yann@1856
    24
        mkdir -p "${CT_BUILD_DIR}/build-sstrip"
yann@1856
    25
        cd "${CT_BUILD_DIR}/build-sstrip"
yann@479
    26
yann@1856
    27
        CT_DoLog EXTRA "Building sstrip"
yann@1856
    28
        CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c"
yann@479
    29
yann@1856
    30
        CT_DoLog EXTRA "Installing sstrip"
yann@1856
    31
        CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
yann@479
    32
yann@1856
    33
        CT_EndStep
yann@1856
    34
    }
yann@1856
    35
fi