Commit 9d2567f1 authored by Timo Teräs's avatar Timo Teräs

abuild: preserve xattrs when creating -dbg

parent 21bf69f6
......@@ -1532,10 +1532,12 @@ default_dbg() {
mkdir -p $dstdir
fi
cd $srcdir
local XATTR=$(getfattr --match="" --dump "${srcfile}")
${CROSS_COMPILE}objcopy --only-keep-debug $srcfile $dstfile
${CROSS_COMPILE}objcopy --add-gnu-debuglink=$dstfile $srcdir/$srcfile
mv $dstfile $dstdir
${CROSS_COMPILE}strip $srcfile
[ -n "$XATTR" ] && { echo "$XATTR" | setfattr --restore=-; }
done
return 0
}
......@@ -1978,9 +1980,9 @@ stripbin() {
scanelf --recursive --nobanner --etype "ET_DYN,ET_EXEC" . \
| sed -e 's:^ET_DYN ::' -e 's:^ET_EXEC ::' \
| while read filename; do
XATTR=$(getfattr --match="" --dump "${filename}")
local XATTR=$(getfattr --match="" --dump "${filename}")
"${stripcmd}" "${filename}"
[ -n "$XATTR" ] && (echo "$XATTR" | setfattr --restore=-)
[ -n "$XATTR" ] && { echo "$XATTR" | setfattr --restore=-; }
done
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment