brp-strip-lto: Run strip in parallel
Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
20749d9857
commit
776d974885
@ -5,6 +5,7 @@ if [ -z "$RPM_BUILD_ROOT" ] || [ "$RPM_BUILD_ROOT" = "/" ]; then
|
||||
fi
|
||||
|
||||
STRIP=${1:-strip}
|
||||
NCPUS=${RPM_BUILD_NCPUS:-1}
|
||||
|
||||
case `uname -a` in
|
||||
Darwin*) exit 0 ;;
|
||||
@ -12,7 +13,5 @@ Darwin*) exit 0 ;;
|
||||
esac
|
||||
|
||||
# Strip ELF binaries
|
||||
for f in `find "$RPM_BUILD_ROOT" -type f -name \*.[ao] -print | \
|
||||
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug"`; do
|
||||
$STRIP -p -R .gnu.lto_* -R .gnu.debuglto_* -N __gnu_lto_v1 "$f" || :
|
||||
done
|
||||
find "$RPM_BUILD_ROOT" -type f -name '*.[ao]' \! -regex "$RPM_BUILD_ROOT/*usr/lib/debug.*" -print0 | \
|
||||
xargs -0 -r -P$NCPUS -I{} $STRIP -p -R .gnu.lto_* -R .gnu.debuglto_* -N __gnu_lto_v1 '{}'
|
||||
|
Loading…
Reference in New Issue
Block a user