]> xenbits.xen.org Git - xenclient/build.git/commitdiff
Fix rsync errors during build (race between find+chmod and rsync)
authorJames Mckenzie <jamesmck@taoand.cam.xci-test.com>
Mon, 30 Nov 2009 18:57:44 +0000 (18:57 +0000)
committerJames Mckenzie <jamesmck@taoand.cam.xci-test.com>
Mon, 30 Nov 2009 18:57:44 +0000 (18:57 +0000)
toolchain/external-toolchain/ext-tool.mk

index e009c8ae1aa75d1c5f9b1d86fdb37225a7724277..7fd706e91b39e8fb5fd05c718a3a47353dee23b5 100644 (file)
@@ -44,11 +44,17 @@ copy_toolchain_lib_root = \
  \
        echo -n
 
+#copy_toolchain_sysroot = \
+#      SYSROOT_DIR=`$(TARGET_CC) -v 2>&1 | grep ^Configured | tr " " "\n" | grep -- "--with-sysroot" | cut -f2 -d=`; \
+#      cp -a $${SYSROOT_DIR}/* $(STAGING_DIR)/ ; \
+#      find $(STAGING_DIR) -type d | xargs chmod 755; \
+#      find $(STAGING_DIR) -type f | xargs xargs chmod +w
+
+EXT_SYSROOT_DIR=${shell $(TARGET_CC) -v 2>&1 | grep ^Configured | tr " " "\n" | grep -- "--with-sysroot" | cut -f2 -d=` }
+
 copy_toolchain_sysroot = \
-       SYSROOT_DIR=`$(TARGET_CC) -v 2>&1 | grep ^Configured | tr " " "\n" | grep -- "--with-sysroot" | cut -f2 -d=`; \
-       cp -a $${SYSROOT_DIR}/* $(STAGING_DIR)/ ; \
-       find $(STAGING_DIR) -type d | xargs chmod 755; \
-       find $(STAGING_DIR) -type f | xargs xargs chmod +w
+       tar cfC - ${EXT_SYSROOT_DIR}  --mode a+r+w+X .  | tar xfpBC - $(STAGING_DIR)
+
 
 uclibc: dependencies $(TARGET_DIR)/lib/$(strip $(subst ",, $(BR2_TOOLCHAIN_EXTERNAL_LIB_C)))