scripts/build/binutils/sstrip.sh
changeset 2926 d304c8a7bfa8
parent 2324 68ec66ee2ff9
     1.1 --- a/scripts/build/binutils/sstrip.sh	Sun Feb 27 15:34:30 2011 +0100
     1.2 +++ b/scripts/build/binutils/sstrip.sh	Sun Jul 17 18:29:35 2011 +0200
     1.3 @@ -1,8 +1,8 @@
     1.4  # This will build and install sstrip to run on host and sstrip target files
     1.5  
     1.6 -do_sstrip_get() { :; }
     1.7 -do_sstrip_extract() { :; }
     1.8 -do_sstrip() { :; }
     1.9 +do_sstrip_get()      { :; }
    1.10 +do_sstrip_extract()  { :; }
    1.11 +do_sstrip_for_host() { :; }
    1.12  
    1.13  if [ "${CT_SSTRIP}" = "y" ]; then
    1.14      do_sstrip_get() {
    1.15 @@ -19,11 +19,13 @@
    1.16          CT_DoExecLog DEBUG cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
    1.17      }
    1.18  
    1.19 -    do_sstrip() {
    1.20 +    # Build sstrip for host -> target
    1.21 +    # Note: we don't need sstrip to run on the build machine,
    1.22 +    # so we do not need the frontend/backend stuff...
    1.23 +    do_sstrip_for_host() {
    1.24          local sstrip_cflags
    1.25 -        CT_DoStep INFO "Installing sstrip"
    1.26 -        mkdir -p "${CT_BUILD_DIR}/build-sstrip"
    1.27 -        cd "${CT_BUILD_DIR}/build-sstrip"
    1.28 +        CT_DoStep INFO "Installing sstrip for host"
    1.29 +        CT_mkdir_pushd "${CT_BUILD_DIR}/build-sstrip-host"
    1.30  
    1.31          if [ "${CT_STATIC_TOOLCHAIN}" = "y" ]; then
    1.32              sstrip_cflags="-static"
    1.33 @@ -35,6 +37,7 @@
    1.34          CT_DoLog EXTRA "Installing sstrip"
    1.35          CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
    1.36  
    1.37 +        CT_Popd
    1.38          CT_EndStep
    1.39      }
    1.40  fi