internals: fix stripping host binaries 1.10
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Feb 17 21:54:07 2011 +0100 (2011-02-17)
branch1.10
changeset 23891cf50fe7c418
parent 2298 dabf63d30d50
child 2390 844765e01257
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>
(transplanted from a3818c3b03e053adb8f6b7e6cf326f16a7f0c4aa)
scripts/build/internals.sh
     1.1 --- a/scripts/build/internals.sh	Tue Feb 01 00:20:35 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