summaryrefslogtreecommitdiffhomepage
path: root/subr/post_strip.subr
blob: 68b8e2e4585b3f6efc4bf9bc7ba1e4450b9239cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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