Merge branch 'cross-strip' into 'master'
Draft: abuild: simplify cross strip See merge request alpine/abuild!287
This commit is contained in:
commit
7628aef580
|
@ -2646,13 +2646,6 @@ stripbin() {
|
|||
fi
|
||||
cd "${subpkgdir:-$pkgdir}" || return 1
|
||||
|
||||
local stripcmd=strip
|
||||
case "${subpkgarch:-$pkgarch}" in
|
||||
$CBUILD_ARCH) stripcmd="strip" ;;
|
||||
$CARCH) stripcmd="${CHOST}-strip" ;;
|
||||
$CTARGET_ARCH) stripcmd="${CTARGET}-strip" ;;
|
||||
esac
|
||||
|
||||
msg "Stripping binaries"
|
||||
scanelf --recursive --nobanner --osabi --etype "ET_DYN,ET_EXEC" . \
|
||||
| while read type osabi filename; do
|
||||
|
@ -2662,7 +2655,7 @@ stripbin() {
|
|||
|
||||
[ "$osabi" != "STANDALONE" ] || continue
|
||||
local XATTR=$(getfattr --match="" --dump "${filename}")
|
||||
"${stripcmd}" "${filename}"
|
||||
${CROSS_COMPILE}strip "${filename}"
|
||||
if [ -n "$XATTR" ]; then
|
||||
echo "$XATTR" | "$SETFATTR" --restore=-
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue