From 0126fa578c466d1ded28d7e7c04e3743431d4571 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Thu, 31 Aug 2017 17:13:41 +0000 Subject: gnu-toolchain: Fix debug stripping for cross-builds of stage2 The stage2 elements were all using the default strip-commands which don't take into account the fact that we might be cross-compiling. An `objcopy` build for one architecture will ignore binaries for other architectures that it doesn't understand, so in practice no stripping was taking place for the stage2 components when we were doing cross-builds. With this change, a stage2 sysroot containing just the 'runtime' and 'devel' domains has gone from 889MB to 306MB. --- elements/gnu-toolchain/stage2-make.bst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'elements/gnu-toolchain/stage2-make.bst') diff --git a/elements/gnu-toolchain/stage2-make.bst b/elements/gnu-toolchain/stage2-make.bst index 9c804f1b..0cb4cdb4 100644 --- a/elements/gnu-toolchain/stage2-make.bst +++ b/elements/gnu-toolchain/stage2-make.bst @@ -27,3 +27,7 @@ config: --build=$(sh config/config.guess) --host=%{target-stage1} build-commands: - STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" make + + strip-commands: + - | + %{stage2-strip-binaries} -- cgit v1.2.1