internals: fix stripping host binaries
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Feb 17 21:54:07 2011 +0100 (2011-02-17)
changeset 2301a3818c3b03e0
parent 2300 60d9591ed5bd
child 2302 e85077497eb1
internals: fix stripping host binaries

The gcc used by linaro has a version number specific to Linaro, but
identifies itself with its upstream version numbering scheme.

This breaks the strip in the finish step, because the actual gcc version
is not the same as the configured one (eg. 4.5.2 vs. linaro-4.5-2011.02-0).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/build/internals.sh
     1.1 --- a/scripts/build/internals.sh	Sat Feb 12 17:31:12 2011 +0100
     1.2 +++ b/scripts/build/internals.sh	Thu Feb 17 21:54:07 2011 +0100
     1.3 @@ -7,6 +7,7 @@
     1.4      local _t
     1.5      local _type
     1.6      local strip_args
     1.7 +    local gcc_version
     1.8  
     1.9      CT_DoStep INFO "Cleaning-up the toolchain's directory"
    1.10  
    1.11 @@ -21,10 +22,11 @@
    1.12          esac
    1.13          CT_DoLog INFO "Stripping all toolchain executables"
    1.14          CT_Pushd "${CT_PREFIX_DIR}"
    1.15 -        for _t in "bin/${CT_TARGET}-"*                                          \
    1.16 -                  "${CT_TARGET}/bin/"*                                          \
    1.17 -                  "libexec/gcc/${CT_TARGET}/${CT_CC_VERSION}/"*                 \
    1.18 -                  "libexec/gcc/${CT_TARGET}/${CT_CC_VERSION}/install-tools/"*   \
    1.19 +        gcc_version=$( "./bin/${CT_TARGET}-gcc" -dumpversion )
    1.20 +        for _t in "bin/${CT_TARGET}-"*                                      \
    1.21 +                  "${CT_TARGET}/bin/"*                                      \
    1.22 +                  "libexec/gcc/${CT_TARGET}/${gcc_version}/"*               \
    1.23 +                  "libexec/gcc/${CT_TARGET}/${gcc_version}/install-tools/"* \
    1.24          ; do
    1.25              _type="$( file "${_t}" |cut -d ' ' -f 2- )"
    1.26              case "${_type}" in