scripts/build/binutils/sstrip.sh
author David Holsgrove <david.holsgrove@xilinx.com>
Thu Oct 11 14:39:42 2012 +1000 (2012-10-11)
changeset 3090 a221c86d9b33
parent 2324 68ec66ee2ff9
permissions -rw-r--r--
binutils/elf2flt: Add CUSTOM version, CUSTOM_LOCATION config options, GetCustom

CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.

Change elf2flt CT_ELF2FLT_VERSION from 'head' to 'cvs' if cvs selected in config

Also remove hardcoded 'cvs-' from elf2flt component name, used in CT_Extract,
CT_Patch and as the CT_SRC_DIR location for the configure stage.

Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: fix indentation, don't patch custom dir location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <288db3721a37844defa5.1349931196@localhost.localdomain>
PatchWork-Id: 190789
     1 # This will build and install sstrip to run on host and sstrip target files
     2 
     3 do_sstrip_get()      { :; }
     4 do_sstrip_extract()  { :; }
     5 do_sstrip_for_host() { :; }
     6 
     7 if [ "${CT_SSTRIP}" = "y" ]; then
     8     do_sstrip_get() {
     9         CT_GetFile sstrip .c http://git.buildroot.net/buildroot/plain/toolchain/sstrip
    10     }
    11 
    12     do_sstrip_extract() {
    13         # We leave the sstrip maintenance to the buildroot people:
    14         # -> any fix-up goes directly there
    15         # -> we don't have patches for it
    16         # -> we don't need to patch it
    17         # -> just create a directory in src/, and copy it there.
    18         CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/sstrip"
    19         CT_DoExecLog DEBUG cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
    20     }
    21 
    22     # Build sstrip for host -> target
    23     # Note: we don't need sstrip to run on the build machine,
    24     # so we do not need the frontend/backend stuff...
    25     do_sstrip_for_host() {
    26         local sstrip_cflags
    27         CT_DoStep INFO "Installing sstrip for host"
    28         CT_mkdir_pushd "${CT_BUILD_DIR}/build-sstrip-host"
    29 
    30         if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
    31             sstrip_cflags="-static"
    32         fi
    33 
    34         CT_DoLog EXTRA "Building sstrip"
    35         CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall ${sstrip_cflags} -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c"
    36 
    37         CT_DoLog EXTRA "Installing sstrip"
    38         CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
    39 
    40         CT_Popd
    41         CT_EndStep
    42     }
    43 fi