diff options
-rw-r--r-- | kconfig/binutils.kconfig | 4 | ||||
-rw-r--r-- | mk/binutils.mk | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/kconfig/binutils.kconfig b/kconfig/binutils.kconfig index 27f8dfd..60b95e3 100644 --- a/kconfig/binutils.kconfig +++ b/kconfig/binutils.kconfig @@ -32,12 +32,16 @@ choice bool "binutils-2.20" config EMBTK_BINUTILS_VERSION_2_19_1 bool "binutils-2.19.1" + select EMBTK_BINUTILS_NEED_PATCH config EMBTK_BINUTILS_VERSION_2_18 bool "binutils-2.18" config EMBTK_BINUTILS_VERSION_2_17 bool "binutils-2.17" endchoice +config EMBTK_BINUTILS_NEED_PATCH + bool + config EMBTK_BINUTILS_VERSION_STRING string default "2.20" if EMBTK_BINUTILS_VERSION_2_20 diff --git a/mk/binutils.mk b/mk/binutils.mk index 30c133d..dc2f7f7 100644 --- a/mk/binutils.mk +++ b/mk/binutils.mk @@ -24,6 +24,7 @@ BINUTILS_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_BINUTILS_VERSION_STRING))) BINUTILS_SITE := http://ftp.gnu.org/gnu/binutils +BINUTILS_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/binutils BINUTILS_PACKAGE := binutils-$(BINUTILS_VERSION).tar.bz2 BINUTILS_BUILD_DIR := $(TOOLS_BUILD)/binutils @@ -41,9 +42,18 @@ download_binutils: @test -e $(DOWNLOAD_DIR)/$(BINUTILS_PACKAGE) || \ wget -O $(DOWNLOAD_DIR)/$(BINUTILS_PACKAGE) \ $(BINUTILS_SITE)/$(BINUTILS_PACKAGE) +ifeq ($(CONFIG_EMBTK_BINUTILS_NEED_PATCH),y) + @test -e $(DOWNLOAD_DIR)/binutils-$(BINUTILS_VERSION).patch || \ + wget -O $(DOWNLOAD_DIR)/binutils-$(BINUTILS_VERSION).patch \ + $(BINUTILS_PATCH_SITE)/binutils-$(BINUTILS_VERSION)-*.patch +endif $(BINUTILS_BUILD_DIR)/.decompressed: @tar -C $(TOOLS_BUILD) -xjf $(DOWNLOAD_DIR)/$(BINUTILS_PACKAGE) +ifeq ($(CONFIG_EMBTK_BINUTILS_NEED_PATCH),y) + cd $(TOOLS_BUILD)/binutils-$(BINUTILS_VERSION); \ + patch -p1 < (DOWNLOAD_DIR)/binutils-$(BINUTILS_VERSION).patch +endif @mkdir -p $(BINUTILS_BUILD_DIR) @touch $@ |