# Install the built shared libraries from each HWCAPS subtarget.
# Note that installing the dynamic linker has no effect.

# List of shared objects differs from each architecture.
for level in "${HWCAPS[@]}" ; do
	abinfo "($level) Harvesting optimized libraries ..."
	for lib in \
		libanl.so.1 \
		libc.so.6 \
		libdl.so.2 \
		libm.so.6 \
		libnsl.so.1 \
		libnss_compat.so.2 \
		libnss_db.so.2 \
		libnss_dns.so.2 \
		libnss_files.so.2 \
		libnss_hesiod.so.2 \
		libpthread.so.0 \
		libresolv.so.2 \
		librt.so.1 \
		libthread_db.so.1 \
		libutil.so.1 ; do
		install -Dvm755 "$SRCDIR"/build-"$level"/dist/usr/lib/$lib \
			"$PKG_PKGDIR"/usr/lib/glibc-hwcaps/$level/$lib
	done
	abinfo "($level) Done harvesting optimized libraries."
done
