summaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
authorChris Zankel <chris@zankel.net>2012-11-15 03:53:52 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2012-11-15 16:39:48 +0100
commitd8792a04ca0d8615424f7964155782b1206b5c8d (patch)
treea98304e96305ad0e2fb84c6c7f75ad00e500733d /toolchain
parent75720db391376ef23b92e504c43f9972efd53141 (diff)
downloadbuildroot-novena-d8792a04ca0d8615424f7964155782b1206b5c8d.tar.gz
buildroot-novena-d8792a04ca0d8615424f7964155782b1206b5c8d.zip
xtensa: support configurable processor configurations
Xtensa is a configurable processor architecture, which allows to define additional instructions and registers. The required variant specific information for the toolchain is delivered in an 'overlay' file, which needs to be 'untarred' to the corresponding directories after the source is installed and patched. This patch provides support for binutils, gcc, and gdb with a very limited changes to the build scripts. These additions are only executed for the Xtensa architecture and have no effect on other architectures. [Thomas: rebased on top of the 'arch: improve definition of gcc mtune, mcpu, etc.' patch, and changed 'Target ABI' to 'Target Architecture Variant']. Signed-off-by: Chris Zankel <chris@zankel.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/gcc/gcc-uclibc-4.x.mk4
-rw-r--r--toolchain/gdb/gdb.mk4
2 files changed, 8 insertions, 0 deletions
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 1a075cc00..1710070ed 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -251,6 +251,10 @@ $(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE)
rm -rf $(GCC_DIR)
$(GCC_CAT) $(DL_DIR)/$(GCC_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
$(call CONFIG_UPDATE,$(@D))
+ifneq ($(call qstrip, $(BR2_xtensa_core_name)),)
+ tar xf $(BR2_xtensa_overlay_dir)/xtensa_$(call qstrip,\
+ $(BR2_xtensa_core_name)).tar -C $(@D) include
+endif
touch $@
gcc-patched: $(GCC_DIR)/.patched
diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk
index 6b029a8c6..dc305a63b 100644
--- a/toolchain/gdb/gdb.mk
+++ b/toolchain/gdb/gdb.mk
@@ -25,6 +25,10 @@ gdb-unpacked: $(GDB_DIR)/.unpacked
$(GDB_DIR)/.unpacked: $(DL_DIR)/$(GDB_SOURCE)
mkdir -p $(GDB_DIR)
$(GDB_CAT) $(DL_DIR)/$(GDB_SOURCE) | tar -C $(GDB_DIR) $(TAR_STRIP_COMPONENTS)=1 $(TAR_OPTIONS) -
+ifneq ($(call qstrip, $(BR2_xtensa_core_name)),)
+ tar xf $(BR2_xtensa_overlay_dir)/xtensa_$(call qstrip, \
+ $(BR2_xtensa_core_name)).tar -C $(@D) bfd include gdb
+endif
ifneq ($(wildcard $(GDB_PATCH_DIR)),)
support/scripts/apply-patches.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch
endif