yann@479: # This will build and install sstrip to run on host and sstrip target files yann@479: yann@2926: do_sstrip_get() { :; } yann@2926: do_sstrip_extract() { :; } yann@2926: do_sstrip_for_host() { :; } yann@1854: yann@1856: if [ "${CT_SSTRIP}" = "y" ]; then yann@1856: do_sstrip_get() { yann@1856: CT_GetFile sstrip .c http://git.buildroot.net/buildroot/plain/toolchain/sstrip yann@1856: } yann@479: yann@1856: do_sstrip_extract() { yann@1856: # We leave the sstrip maintenance to the buildroot people: yann@1856: # -> any fix-up goes directly there yann@1856: # -> we don't have patches for it yann@1856: # -> we don't need to patch it yann@1856: # -> just create a directory in src/, and copy it there. yann@1856: CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/sstrip" yann@1856: CT_DoExecLog DEBUG cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip" yann@1856: } yann@479: yann@2926: # Build sstrip for host -> target yann@2926: # Note: we don't need sstrip to run on the build machine, yann@2926: # so we do not need the frontend/backend stuff... yann@2926: do_sstrip_for_host() { yann@2324: local sstrip_cflags yann@2926: CT_DoStep INFO "Installing sstrip for host" yann@2926: CT_mkdir_pushd "${CT_BUILD_DIR}/build-sstrip-host" yann@479: yann@2324: if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then yann@2324: sstrip_cflags="-static" yann@2324: fi yann@2324: yann@1856: CT_DoLog EXTRA "Building sstrip" yann@2324: CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall ${sstrip_cflags} -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c" yann@479: yann@1856: CT_DoLog EXTRA "Installing sstrip" yann@1856: CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip" yann@479: yann@2926: CT_Popd yann@1856: CT_EndStep yann@1856: } yann@1856: fi