Blame SOURCES/brp-strip-lto

396caf
#!/usr/bin/sh
396caf
# If using normal root, avoid changing anything.
396caf
if [ -z "$RPM_BUILD_ROOT" ] || [ "$RPM_BUILD_ROOT" = "/" ]; then
396caf
	exit 0
396caf
fi
396caf
396caf
STRIP=${1:-strip}
396caf
NCPUS=${RPM_BUILD_NCPUS:-1}
396caf
396caf
case `uname -a` in
396caf
Darwin*) exit 0 ;;
396caf
*) ;;
396caf
esac
396caf
396caf
# Strip ELF binaries
396caf
find "$RPM_BUILD_ROOT" -type f -name '*.[ao]' \! -regex "$RPM_BUILD_ROOT/*usr/lib/debug.*" -print0 | \
396caf
  eu-elfclassify --not-program --not-library --not-linux-kernel-module --stdin0 --print0 | xargs -0 -r -P$NCPUS -n32 sh -c "$STRIP -p -R .gnu.lto_* -R .gnu.debuglto_* -N __gnu_lto_v1 \"\$@\"" ARG0