mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2024-12-29 02:12:06 +00:00
abuild: use pax-utils's scanelf to find binaries to strip
This commit is contained in:
parent
9999ee02b5
commit
78ca93d237
13
abuild.in
13
abuild.in
@ -834,16 +834,9 @@ stripbin() {
|
||||
options_has "!strip" && return 0
|
||||
cd "${subpkgdir:-$pkgdir}" || return 1
|
||||
msg "Stripping binaries"
|
||||
find . -type f 2>/dev/null | while read bin; do
|
||||
local opt=
|
||||
case "$(file -biz "$bin")" in
|
||||
*/x-sharedlib*|*/x-archive*)
|
||||
strip --strip-debug "$bin";;
|
||||
*/x-executable*)
|
||||
strip "$bin";;
|
||||
esac
|
||||
done
|
||||
return 0
|
||||
scanelf --recursive --nobanner --etype "ET_DYN,ET_EXEC" . \
|
||||
| sed -e 's:^ET_DYN ::' -e 's:^ET_EXEC ::' \
|
||||
| xargs -r strip
|
||||
}
|
||||
|
||||
# simply list target apks
|
||||
|
Loading…
Reference in New Issue
Block a user