summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-12-05 15:27:06 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-12-05 15:27:06 (GMT)
commit2bf2991ebd96a69c3ca413a330e34696eeb286a7 (patch)
tree5e32af62d8becb7aa685d448e7300e7a2d8f5595 /scripts
parent1ad439907283fb073b7be9c4466a996868e85adc (diff)
scripts/internals: strip all executables
Using a list of files to strip misses a few of them. Now, scan appropriate directories, and strip all ELF executables and shared objects. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/internals.sh22
1 files changed, 14 insertions, 8 deletions
diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh
index 1ef8e97..4dafafb 100644
--- a/scripts/build/internals.sh
+++ b/scripts/build/internals.sh
@@ -5,6 +5,7 @@
# crosstool-NG-provided files.
do_finish() {
local _t
+ local _type
local strip_args
CT_DoStep INFO "Cleaning-up the toolchain's directory"
@@ -20,14 +21,19 @@ do_finish() {
esac
CT_DoLog INFO "Stripping all toolchain executables"
CT_Pushd "${CT_PREFIX_DIR}"
- for t in ar as c++ c++filt cpp dlltool dllwrap g++ gcc gcc-${CT_CC_VERSION} gcov gprof ld nm objcopy objdump ranlib readelf size strings strip addr2line windmc windres; do
- [ -x bin/${CT_TARGET}-${t}${CT_HOST_SUFFIX} ] && ${CT_HOST}-strip ${strip_args} bin/${CT_TARGET}-${t}${CT_HOST_SUFFIX}
- [ -x ${CT_TARGET}/bin/${t}${CT_HOST_SUFFIX} ] && ${CT_HOST}-strip ${strip_args} ${CT_TARGET}/bin/${t}${CT_HOST_SUFFIX}
- done
- CT_Popd
- CT_Pushd "${CT_PREFIX_DIR}/libexec/gcc/${CT_TARGET}/${CT_CC_VERSION}"
- for t in cc1 cc1plus collect2; do
- [ -x ${t}${CT_HOST_SUFFIX} ] && ${CT_HOST}-strip ${strip_args} ${t}${CT_HOST_SUFFIX}
+ for _t in "bin/${CT_TARGET}-"* \
+ "${CT_TARGET}/bin/"* \
+ "libexec/gcc/${CT_TARGET}/${CT_CC_VERSION}/"* \
+ "libexec/gcc/${CT_TARGET}/${CT_CC_VERSION}/install-tools/"* \
+ ; do
+ _type="$( file "${_t}" |cut -d ' ' -f 2- )"
+ case "${_type}" in
+ *"shell script text executable")
+ ;;
+ *executable*)
+ CT_DoExecLog ALL ${CT_HOST}-strip ${strip_args} "${_t}"
+ ;;
+ esac
done
CT_Popd
fi