summaryrefslogtreecommitdiffhomepage
path: root/subr/post_strip.subr
blob: 5225021bb38ead5fec4b02e293bd004006129125 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#
# set -o errexit -o noglob are assumed.
#

post_strip() {
	local __;
	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