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 }