aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-08-26 12:32:51 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-08-26 12:32:51 +0000
commit72ee1edd7dad9750f3d84415d3875b2dfec7617f (patch)
tree3629b8b32c017709a0a37ca8f9aa530a6bd51cda
parent0b67a9fef5052092042f1865c3d97fa802cb8a79 (diff)
downloadupstream-72ee1edd7dad9750f3d84415d3875b2dfec7617f.tar.gz
upstream-72ee1edd7dad9750f3d84415d3875b2dfec7617f.tar.bz2
upstream-72ee1edd7dad9750f3d84415d3875b2dfec7617f.zip
target/toolchain: strip files, leave out the initial gcc
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42302 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/toolchain/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/target/toolchain/Makefile b/target/toolchain/Makefile
index 20f753a271..6e60a08231 100644
--- a/target/toolchain/Makefile
+++ b/target/toolchain/Makefile
@@ -19,6 +19,7 @@ PKG_CPU:=$(word 1,$(subst -, ,$(shell $(HOSTCC) -dumpmachine)))
TOOLCHAIN_NAME:=OpenWrt-Toolchain-$(BOARD)-for-$(ARCH)$(ARCH_SUFFIX)-gcc-$(GCCV)$(DIR_SUFFIX)
TOOLCHAIN_BUILD_DIR:=$(BUILD_DIR)/$(TOOLCHAIN_NAME)
EXCLUDE_DIRS:=*/ccache \
+ */initial \
*/stamp \
*/stampfiles \
*/man \
@@ -46,6 +47,15 @@ $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.bz2: clean
ln -sf $(REAL_GNU_TARGET_NAME)-wrapper.sh $(REAL_GNU_TARGET_NAME)-$${app} ; \
done; \
)
+
+ @-( \
+ find \
+ $(TOOLCHAIN_BUILD_DIR)/*/bin \
+ $(TOOLCHAIN_BUILD_DIR)/*/*/bin \
+ $(TOOLCHAIN_BUILD_DIR)/*/libexec \
+ -type f; \
+ ) | xargs strip 2>/dev/null >/dev/null
+
echo REVISION:="$(REVISION)" > $(TOOLCHAIN_BUILD_DIR)/version.mk
find $(TOOLCHAIN_BUILD_DIR) -name .git | $(XARGS) rm -rf
find $(TOOLCHAIN_BUILD_DIR) -name .svn | $(XARGS) rm -rf