# non-default architecture variant is used. Without this, the
# compiler fails to find libraries and headers.
#
+# Note that the 'locale' directories are not copied. They are huge
+# (400+MB) in CodeSourcery toolchains, and they are not really useful.
+#
# $1: main sysroot directory of the toolchain
# $2: arch specific sysroot directory of the toolchain
# $3: arch specific subdirectory in the sysroot
ARCH_SUBDIR="$(strip $3)"; \
for i in etc lib sbin usr ; do \
if [ -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \
- cp -a $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
+ rsync -au --exclude 'usr/lib/locale' $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
fi ; \
done ; \
if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \