diff options
Diffstat (limited to 'subr/post_strip.subr')
-rw-r--r-- | subr/post_strip.subr | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/subr/post_strip.subr b/subr/post_strip.subr new file mode 100644 index 00000000..68b8e2e4 --- /dev/null +++ b/subr/post_strip.subr @@ -0,0 +1,17 @@ +# +# . ./build.vars and set -o errexit -o noglob are assumed. +# + +post_strip() { + if [ ${BUILD_SCRIPT_RC:-0} -eq 0 ]\ + && [ "${BUILD}" = release ]; then + for __ in $(find ${PREFIX_NATIVE}/bin -perm -0100 \( -type f -or -type l \)); do + if objdump -sj .debug_info >/dev/null 2>&1; then + log_msg vnfo "${PKG_TARGET}-strip ${__}"; + set +o errexit; ${PKG_TARGET}-strip ${__}; set -o errexit; + fi; + done; + fi; +}; + +# vim:filetype=sh |