From c2259b779de9c6c533f95f56b71599f3d301ba55 Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Mon, 19 Feb 2018 07:08:48 +0000 Subject: [PATCH] config/functions: use BUILD_WITH_DEBUG variable, add sanity check --- config/functions | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/functions b/config/functions index 79db72da65..5d85c3dd13 100644 --- a/config/functions +++ b/config/functions @@ -787,7 +787,12 @@ check_config() { # strip debug_strip() { - if [ ! "$DEBUG" = yes ]; then + if [ -z "${BUILD_WITH_DEBUG}" ]; then + echo "ERROR: debug_strip() must not be called without configuring BUILD_WITH_DEBUG" >&2 + exit 1 + fi + + if [ "${BUILD_WITH_DEBUG}" != "yes" ]; then find $* -type f -executable | xargs $STRIP 2>/dev/null || : fi }