264 |
fi |
fi |
265 |
|
|
266 |
# strip all binaries |
# strip all binaries |
267 |
find ${BINDIR} | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded || die |
find ${BINDIR} ! -type d | xargs --no-run-if-empty file | grep -v "pie executable" | grep "executable" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip --strip-unneeded || die |
268 |
|
|
269 |
# strip all libraries |
# strip all libraries |
270 |
# want to be safe here; --strip-unneeded seems to cause pthread problems |
# want to be safe here; --strip-unneeded seems to cause pthread problems |
273 |
mv ${BINDIR}/usr/$(mlibdir)/lib{pthread,thread_db}* ${BUILDDIR}/thread-backup/ || die |
mv ${BINDIR}/usr/$(mlibdir)/lib{pthread,thread_db}* ${BUILDDIR}/thread-backup/ || die |
274 |
|
|
275 |
# now strip but only debuging symbols |
# now strip but only debuging symbols |
276 |
find ${BINDIR} | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-debug || die |
find ${BINDIR} ! -type d | xargs --no-run-if-empty file | grep "[shared object|pie executable]" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip --strip-debug || die |
277 |
find ${BINDIR} | xargs file | grep "ar archive" | cut -f 1 -d : | xargs strip --strip-debug || die |
find ${BINDIR} ! -type d | xargs --no-run-if-empty file | grep "ar archive" | cut -f 1 -d : | xargs --no-run-if-empty strip --strip-debug || die |
278 |
mv -f ${BUILDDIR}/thread-backup/* ${BINDIR}/usr/$(mlibdir)/ || die |
mv -f ${BUILDDIR}/thread-backup/* ${BINDIR}/usr/$(mlibdir)/ || die |
279 |
# remove stale directory |
# remove stale directory |
280 |
rm -rf ${BUILDDIR}/thread-backup || die |
rm -rf ${BUILDDIR}/thread-backup || die |