toolchain: xtensa toolchain patch support
authorMaxim Grigoriev <maxim2405@gmail.com>
Fri, 24 Jul 2009 00:32:33 +0000 (02:32 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Fri, 24 Jul 2009 00:32:33 +0000 (02:32 +0200)
Part of #163.

Signed-off-by: Maxim Grigoriev <maxim2405@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
toolchain/binutils/binutils.mk
toolchain/gcc/gcc-uclibc-4.x.mk
toolchain/gdb/gdb.mk

index 66f393efd9bd1ef1127259b0389065b88e1decfb..bcfbe7451389204ed77e1f091ec8452cab52b1eb 100644 (file)
@@ -55,6 +55,11 @@ BINUTILS_SITE:=$(VENDOR_SITE)
 BINUTILS_PATCH_DIR:=toolchain/binutils/ext_source/$(VENDOR_PATCH_DIR)/$(BINUTILS_OFFICIAL_VERSION)
 endif
 
+ifneq ($(filter xtensa%,$(ARCH)),)
+include target/xtensa/patch.in
+BINUTILS_PATCH_EXTRA:=$(call XTENSA_PATCH,binutils,$(BINUTILS_PATCH_DIR),. ..)
+endif
+
 BINUTILS_SOURCE:=binutils-$(BINUTILS_OFFICIAL_VERSION).tar.bz2
 BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-$(BINUTILS_OFFICIAL_VERSION)
 BINUTILS_CAT:=$(BZCAT)
@@ -76,7 +81,7 @@ $(BINUTILS_DIR)/.unpacked: $(DL_DIR)/$(BINUTILS_SOURCE)
 binutils-patched: $(BINUTILS_DIR)/.patched
 $(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked
        # Apply appropriate binutils patches.
-       toolchain/patch-kernel.sh $(BINUTILS_DIR) $(BINUTILS_PATCH_DIR) \*.patch
+       toolchain/patch-kernel.sh $(BINUTILS_DIR) $(BINUTILS_PATCH_DIR) \*.patch $(BINUTILS_PATCH_EXTRA)
        touch $@
 
 $(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched
index 5770081b3977f79586b4a6905db8ec4a45c7fa08..e9249c1c5c977c652e41aecbb4bb5241deb3276e 100644 (file)
@@ -50,6 +50,11 @@ endif # Snapshot patch
 endif # Not a snapshot
 endif # BR2_TOOLCHAIN_BUILDROOT
 
+ifneq ($(filter xtensa%,$(ARCH)),)
+include target/xtensa/patch.in
+GCC_PATCH_EXTRA:=$(call XTENSA_PATCH,gcc,$(GCC_PATCH_DIR),. ..)
+endif
+
 GCC_SOURCE:=gcc-$(GCC_OFFICIAL_VERSION).tar.bz2
 GCC_DIR:=$(TOOL_BUILD_DIR)/gcc-$(GCC_OFFICIAL_VERSION)
 GCC_CAT:=$(BZCAT)
@@ -164,7 +169,7 @@ $(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE)
 gcc-patched: $(GCC_DIR)/.patched
 $(GCC_DIR)/.patched: $(GCC_DIR)/.unpacked
        # Apply any files named gcc-*.patch from the source directory to gcc
-       toolchain/patch-kernel.sh $(GCC_DIR) $(GCC_PATCH_DIR) \*.patch
+       toolchain/patch-kernel.sh $(GCC_DIR) $(GCC_PATCH_DIR) \*.patch $(GCC_PATCH_EXTRA)
 
        # Note: The soft float situation has improved considerably with gcc 3.4.x.
        # We can dispense with the custom spec files, as well as libfloat for the arm case.
index ba8a1f2737b5a5cf64546aa06f9c22e90be5a321..29c4c9c0b874d5093dce4e99bac95b6a1383a462 100644 (file)
@@ -19,6 +19,11 @@ GDB_SITE:=$(BR2_GNU_MIRROR)/gdb
 GDB_PATCH_DIR:=toolchain/gdb/$(GDB_OFFICIAL_VERSION)
 endif
 
+ifneq ($(filter xtensa%,$(ARCH)),)
+include target/xtensa/patch.in
+GDB_PATCH_EXTRA:=$(call XTENSA_PATCH,gdb,$(GDB_PATCH_DIR),. ..)
+endif
+
 GDB_DIR:=$(TOOL_BUILD_DIR)/gdb-$(GDB_OFFICIAL_VERSION)
 
 $(DL_DIR)/$(GDB_SOURCE):
@@ -33,7 +38,7 @@ ifeq ($(GDB_VERSION),snapshot)
                tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1)
        ln -sf $(TOOL_BUILD_DIR)/$(shell tar jtf $(DL_DIR)/$(GDB_SOURCE) | head -1 | cut -d"/" -f1) $(GDB_DIR)
 endif
-       toolchain/patch-kernel.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch
+       toolchain/patch-kernel.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch $(GDB_PATCH_EXTRA)
        $(CONFIG_UPDATE) $(@D)
        touch $@