toolchain/gcc: parallelize make install
[openwrt/staging/yousong.git] / toolchain / gcc / final / Makefile
index 3434d894a2b501ba9545c99d47066fc43a7b5480..b815f677d669c8cac479d365f52449f64564637c 100644 (file)
@@ -39,7 +39,16 @@ define Host/Configure
        );
 endef
 
+ifeq ($(CONFIG_USE_GLIBC)$(CONFIG_INSTALL_GCCGO),yy)
+define FixGogccCrt
+       # link crtX.o for gotools
+       mkdir -p $(GCC_BUILD_DIR)/gotools
+       $(foreach crt, i 1 n, ln -sf ../../glibc-dev/lib/crt$(crt).o $(GCC_BUILD_DIR)/gotools/ ; )
+endef
+endif
+
 define Host/Compile
+       $(FixGogccCrt)
        +$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) all
 endef
 
@@ -58,7 +67,7 @@ endef
 
 define Host/Install
        $(CleanupToolchain)
-       $(_SINGLE)$(GCC_MAKE) -C $(GCC_BUILD_DIR) install
+       +$(GCC_MAKE) $(HOST_JOBS) -C $(GCC_BUILD_DIR) install
        # Set up the symlinks to enable lying about target name.
        set -e; \
        (cd $(TOOLCHAIN_DIR); \