toolchain: keep the initial gcc around for later uclibc rebuilds
[openwrt.git] / toolchain / binutils / Makefile
index c869568..9d12721 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2011 OpenWrt.org
+# Copyright (C) 2006-2012 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -25,6 +25,9 @@ endif
 ifeq ($(PKG_VERSION),2.21.1)
   PKG_MD5SUM:=bde820eac53fa3a8d8696667418557ad
 endif
+ifeq ($(PKG_VERSION),2.22)
+  PKG_MD5SUM:=ee0f10756c84979622b992a4a61ea3f5
+endif
 
 PATCH_DIR:=./patches/$(PKG_VERSION)
 
@@ -76,7 +79,11 @@ define Host/Compile
 endef
 
 define Host/Install
-       $(MAKE) -C $(HOST_BUILD_DIR) install
+       mkdir -p $(TOOLCHAIN_DIR)/initial
+       $(MAKE) -C $(HOST_BUILD_DIR) \
+               prefix=$(TOOLCHAIN_DIR)/initial \
+               install
+       $(CP) $(TOOLCHAIN_DIR)/initial/. $(TOOLCHAIN_DIR)/
        $(CP) $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-readelf $(REAL_STAGING_DIR_HOST)/bin/readelf
 endef