scripts/build/binutils/sstrip.sh
author "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
Fri Jun 03 17:21:56 2011 +0200 (2011-06-03)
changeset 2503 b5541f296b92
parent 1858 43d14939d956
child 2926 d304c8a7bfa8
permissions -rw-r--r--
kconfig: prepend CT-NG's version tag to PKGVERSION

"crosstool-NG-${CT_VERSION}" is currently the default for TOOLCHAIN_PKGVERSION,
and this options is passed as is to --with-pkgversion.

This patch prepends "crosstool-NG ${CT_VERSION}" to TOOLCHAIN_PKGVERSION before
passing it to --with-pkgversion.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
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@2324
    23
        local sstrip_cflags
yann@1856
    24
        CT_DoStep INFO "Installing sstrip"
yann@1856
    25
        mkdir -p "${CT_BUILD_DIR}/build-sstrip"
yann@1856
    26
        cd "${CT_BUILD_DIR}/build-sstrip"
yann@479
    27
yann@2324
    28
        if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
yann@2324
    29
            sstrip_cflags="-static"
yann@2324
    30
        fi
yann@2324
    31
yann@1856
    32
        CT_DoLog EXTRA "Building sstrip"
yann@2324
    33
        CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall ${sstrip_cflags} -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c"
yann@479
    34
yann@1856
    35
        CT_DoLog EXTRA "Installing sstrip"
yann@1856
    36
        CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
yann@479
    37
yann@1856
    38
        CT_EndStep
yann@1856
    39
    }
yann@1856
    40
fi