summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-03-02 08:48:13 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-03-02 08:48:13 +0100
commit16fb2268394f00ab27e3582d02e03b6f5abbc72e (patch)
treeefe2a72be8461214a7c2e45d40add8b52daee034 /scripts
parent406ccf8df407e0292ee85d259a363c63e2be40a7 (diff)
strip toolchain components without copying debug data, clean toolchain after every target so no 300Gb are required to bulk build the toolchains
Diffstat (limited to 'scripts')
-rw-r--r--scripts/rstrip.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/rstrip.sh b/scripts/rstrip.sh
index e676dea82..bacf25ca7 100644
--- a/scripts/rstrip.sh
+++ b/scripts/rstrip.sh
@@ -5,6 +5,10 @@
SELF=${0##*/}
+if [[ -z $debug ]];then
+ debug=1
+fi
+
if [[ -z $prefix ]]; then
echo >&2 "$SELF: strip command not defined ('prefix' variable not set)"
exit 1
@@ -60,9 +64,13 @@ find $TARGETS -type f -a -exec file {} \; | \
echo "$SELF: $V:$S"
echo "-> $T $F"
eval "chmod u+w $F"
- eval "mkdir -p $D/usr/lib/debug/$Q"
- eval "$O --only-keep-debug $F $D/usr/lib/debug/$P.debug"
+ if [[ $debug -eq 1 ]];then
+ eval "mkdir -p $D/usr/lib/debug/$Q"
+ eval "$O --only-keep-debug $F $D/usr/lib/debug/$P.debug"
+ fi
eval "$T $F"
- eval "cd $D/usr/lib/debug/$Q && $O --add-gnu-debuglink=$R.debug $F"
+ if [[ $debug -eq 1 ]];then
+ eval "cd $D/usr/lib/debug/$Q && $O --add-gnu-debuglink=$R.debug $F"
+ fi
done
exit 0