summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/binutils/binutils.mk7
-rw-r--r--toolchain/external-toolchain/ext-tool.mk207
-rw-r--r--toolchain/gcc/4.4.1/100-uclibc-conf.patch (renamed from toolchain/gcc/4.4.0/100-uclibc-conf.patch)0
-rw-r--r--toolchain/gcc/4.4.1/301-missing-execinfo_h.patch (renamed from toolchain/gcc/4.4.0/301-missing-execinfo_h.patch)0
-rw-r--r--toolchain/gcc/4.4.1/302-c99-snprintf.patch (renamed from toolchain/gcc/4.4.0/302-c99-snprintf.patch)0
-rw-r--r--toolchain/gcc/4.4.1/305-libmudflap-susv3-legacy.patch (renamed from toolchain/gcc/4.4.0/305-libmudflap-susv3-legacy.patch)0
-rw-r--r--toolchain/gcc/4.4.1/810-arm-softfloat-libgcc.patch (renamed from toolchain/gcc/4.4.0/810-arm-softfloat-libgcc.patch)0
-rw-r--r--toolchain/gcc/Config.in2
-rw-r--r--toolchain/gcc/gcc-uclibc-4.x.mk7
-rw-r--r--toolchain/gdb/gdb.mk7
-rw-r--r--toolchain/kernel-headers/Config.in4
-rwxr-xr-xtoolchain/patch-kernel.sh17
-rw-r--r--toolchain/uClibc/uclibc.mk1
13 files changed, 194 insertions, 58 deletions
diff --git a/toolchain/binutils/binutils.mk b/toolchain/binutils/binutils.mk
index 66f393efd..bcfbe7451 100644
--- a/toolchain/binutils/binutils.mk
+++ b/toolchain/binutils/binutils.mk
@@ -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
diff --git a/toolchain/external-toolchain/ext-tool.mk b/toolchain/external-toolchain/ext-tool.mk
index b904775f4..d441a9252 100644
--- a/toolchain/external-toolchain/ext-tool.mk
+++ b/toolchain/external-toolchain/ext-tool.mk
@@ -1,24 +1,52 @@
#
-# copy_toolchain_lib_root
+# This file implements the support for external toolchains, i.e
+# toolchains that have not been produced by Buildroot itself and that
+# are already available on the system on which Buildroot runs.
#
-# $1: source
-# $2: destination
-# $3: strip (y|n) default is to strip
+# The basic principle is the following
+#
+# 1. Perform some checks on the conformity between the toolchain
+# configuration described in the Buildroot menuconfig system, and the
+# real configuration of the external toolchain. This is for example
+# important to make sure that the Buildroot configuration system
+# knows whether the toolchain supports RPC, IPv6, locales, large
+# files, etc. Unfortunately, these things cannot be detected
+# automatically, since the value of these options (such as
+# BR2_INET_RPC) are needed at configuration time because these
+# options are used as dependencies for other options. And at
+# configuration time, we are not able to retrieve the external
+# toolchain configuration.
+#
+# 2. Copy the libraries needed at runtime to the target directory,
+# $(TARGET_DIR). Obviously, things such as the C library, the dynamic
+# loader and a few other utility libraries are needed if dynamic
+# applications are to be executed on the target system.
+#
+# 3. Copy the libraries and headers to the staging directory. This
+# will allow all further calls to gcc to be made using --sysroot
+# $(STAGING_DIR), which greatly simplifies the compilation of the
+# packages when using external toolchains. So in the end, only the
+# cross-compiler binaries remains external, all libraries and headers
+# are imported into the Buildroot tree.
+
+#
+# Copy a toolchain library and its symbolic links from the sysroot
+# directory to the target directory. Also optionaly strips the
+# library.
+#
+# $1: sysroot directory
+# $2: library name
+# $3: destination directory
+# $4: strip (y|n), default is to strip
#
copy_toolchain_lib_root = \
- LIB="$(strip $1)"; \
- DST="$(strip $2)"; \
- STRIP="$(strip $3)"; \
- \
- LIB_DIR=`$(TARGET_CC) -print-file-name=$${LIB} | sed -e "s,$${LIB}\$$,,"`; \
- \
- if test -z "$${LIB_DIR}"; then \
- echo "copy_toolchain_lib_root: lib=$${LIB} not found"; \
- exit -1; \
- fi; \
+ SYSROOT_DIR="$(strip $1)"; \
+ LIB="$(strip $2)"; \
+ DST="$(strip $3)"; \
+ STRIP="$(strip $4)"; \
\
- LIB="$(strip $1)"; \
- for FILE in `find $${LIB_DIR} -maxdepth 1 -type l -name "$${LIB}*"`; do \
+ LIB_DIR="$${SYSROOT_DIR}/lib" ; \
+ for FILE in `find $${LIB_DIR} -maxdepth 1 -name "$${LIB}.*"`; do \
LIB=`basename $${FILE}`; \
while test \! -z "$${LIB}"; do \
rm -fr $(TARGET_DIR)$${DST}/$${LIB}; \
@@ -43,44 +71,62 @@ copy_toolchain_lib_root = \
\
echo -n
+#
+# Copy the full external toolchain sysroot directory to the staging
+# dir
+#
+# $1: sysroot directory
+#
copy_toolchain_sysroot = \
- SYSROOT_DIR=`$(TARGET_CC) -v 2>&1 | grep ^Configured | tr " " "\n" | grep -- "--with-sysroot" | cut -f2 -d=`; \
- if [ -n "$${SYSROOT_DIR}" ]; then cp -a $${SYSROOT_DIR}/* $(STAGING_DIR)/ ; \
- find $(STAGING_DIR) -type d | xargs chmod 755; fi
+ SYSROOT_DIR="$(strip $1)"; \
+ cp -a $${SYSROOT_DIR}/* $(STAGING_DIR)/ ; \
+ find $(STAGING_DIR) -type d | xargs chmod 755
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
-EXTERNAL_LIBC=libc.so.0
-EXTERNAL_LIBS=ld-uClibc.so.0 libcrypt.so.0 libdl.so.0 libgcc_s.so libm.so.0 libnsl.so.0 libpthread.so.0 libresolv.so.0 librt.so.0 libutil.so.0
-else
-EXTERNAL_LIBC=libc.so.6
-EXTERNAL_LIBS=ld-linux.so.3 libcrypt.so.1 libdl.so.2 libgcc_s.so.1 libm.so.6 libnsl.so.1 libpthread.so.0 libresolv.so.2 librt.so.1 libutil.so.1 libnss_files.so.2
-endif
-
-check_clibrary = \
- if ! test -f `$(TARGET_CC) -print-file-name=$(EXTERNAL_LIBC)` ; then \
- echo "Incorrect selection of the C library"; \
- exit -1; \
- fi
-
-# 1: Buildroot option name
-# 2: message
+#
+# Check the availability of a particular glibc feature. We assume that
+# all Buildroot toolchain options are supported by glibc, so we just
+# check that they are enabled.
+#
+# $1: Buildroot option name
+# $2: feature description
+#
check_glibc_feature = \
if [ x$($(1)) != x"y" ] ; then \
echo "$(2) available in C library, please enable $(1)" ; \
exit 1 ; \
fi
+#
+# Check the correctness of a glibc external toolchain configuration.
+# 1. Check that the C library selected in Buildroot matches the one
+# of the external toolchain
+# 2. Check that all the C library-related features are enabled in the
+# config, since glibc always supports all of them
+#
+# $1: sysroot directory
+#
check_glibc = \
+ SYSROOT_DIR="$(strip $1)"; \
+ if ! test -f $${SYSROOT_DIR}/lib/ld-linux.so.* ; then \
+ echo "Incorrect selection of the C library"; \
+ exit -1; \
+ fi; \
$(call check_glibc_feature,BR2_LARGEFILE,Large file support) ;\
$(call check_glibc_feature,BR2_INET_IPV6,IPv6 support) ;\
$(call check_glibc_feature,BR2_INET_RPC,RPC support) ;\
$(call check_glibc_feature,BR2_ENABLE_LOCALE,Locale support) ;\
$(call check_glibc_feature,BR2_USE_WCHAR,Wide char support)
-# 1: uClibc macro name
-# 2: Buildroot option name
-# 3: uClibc config file
-# 4: message
+#
+# Check the conformity of Buildroot configuration with regard to the
+# uClibc configuration of the external toolchain, for a particular
+# feature.
+#
+# $1: uClibc macro name
+# $2: Buildroot option name
+# $3: uClibc config file
+# $4: feature description
+#
check_uclibc_feature = \
IS_IN_LIBC=`grep -q "\#define $(1) 1" $(3) && echo y` ; \
if [ x$($(2)) != x"y" -a x$${IS_IN_LIBC} == x"y" ] ; then \
@@ -92,8 +138,22 @@ check_uclibc_feature = \
exit 1 ; \
fi
+#
+# Check the correctness of a uclibc external toolchain configuration
+# 1. Check that the C library selected in Buildroot matches the one
+# of the external toolchain
+# 2. Check that the features enabled in the Buildroot configuration
+# match the features available in the uClibc of the external
+# toolchain
+#
+# $1: sysroot directory
+#
check_uclibc = \
- SYSROOT_DIR=`$(TARGET_CC) -v 2>&1 | grep ^Configured | tr " " "\n" | grep -- "--with-sysroot" | cut -f2 -d=`; \
+ SYSROOT_DIR="$(strip $1)"; \
+ if ! test -f $${SYSROOT_DIR}/lib/ld-uClibc.so.* ; then \
+ echo "Incorrect selection of the C library"; \
+ exit -1; \
+ fi; \
UCLIBC_CONFIG_FILE=$${SYSROOT_DIR}/usr/include/bits/uClibc_config.h ; \
$(call check_uclibc_feature,__UCLIBC_HAS_LFS__,BR2_LARGEFILE,$${UCLIBC_CONFIG_FILE},Large file support) ;\
$(call check_uclibc_feature,__UCLIBC_HAS_IPV6__,BR2_INET_IPV6,$${UCLIBC_CONFIG_FILE},IPv6 support) ;\
@@ -101,21 +161,70 @@ check_uclibc = \
$(call check_uclibc_feature,__UCLIBC_HAS_LOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale support) ;\
$(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\
-uclibc: dependencies $(TARGET_DIR)/lib/$(EXTERNAL_LIBC)
+#
+# Check that the Buildroot configuration of the ABI matches the
+# configuration of the external toolchain.
+#
+check_arm_abi = \
+ EXT_TOOLCHAIN_TARGET=$(shell LANG=C $(TARGET_CC) -v 2>&1 | grep ^Target | cut -f2 -d ' ') ; \
+ if echo $${EXT_TOOLCHAIN_TARGET} | grep -q 'eabi$$' ; then \
+ EXT_TOOLCHAIN_ABI="eabi" ; \
+ else \
+ EXT_TOOLCHAIN_ABI="oabi" ; \
+ fi ; \
+ if [ x$(BR2_ARM_OABI) == x"y" -a $${EXT_TOOLCHAIN_ABI} == "eabi" ] ; then \
+ echo "Incorrect ABI setting" ; \
+ exit 1 ; \
+ fi ; \
+ if [ x$(BR2_ARM_EABI) == x"y" -a $${EXT_TOOLCHAIN_ABI} == "oabi" ] ; then \
+ echo "Incorrect ABI setting" ; \
+ exit 1 ; \
+ fi ; \
+
+#
+# Check that the cross-compiler given in the configuration exists
+#
+check_cross_compiler_exists = \
+ if ! test -x $(TARGET_CC) ; then \
+ echo "Cannot find cross-compiler $(TARGET_CC)" ; \
+ exit 1 ; \
+ fi ; \
+
+uclibc: dependencies $(STAMP_DIR)/ext-toolchain-installed
-$(TARGET_DIR)/lib/$(EXTERNAL_LIBC):
+EXTERNAL_LIBS=libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libpthread.so libresolv.so librt.so libutil.so
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
+EXTERNAL_LIBS+=ld-uClibc.so
+else
+EXTERNAL_LIBS+=ld-linux.so libnss_files.so
+endif
+
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+EXTERNAL_LIBS+=libstdc++.so
+endif
+
+SYSROOT_DIR=$(shell LANG=C $(TARGET_CC) -v 2>&1 | grep ^Configured | tr " " "\n" | grep -- "--with-sysroot" | cut -f2 -d=)
+
+$(STAMP_DIR)/ext-toolchain-installed:
@echo "Checking external toolchain settings"
- @$(call check_clibrary)
+ $(Q)$(call check_cross_compiler_exists)
+ifeq ($(strip $(SYSROOT_DIR)),)
+ @echo "External toolchain doesn't support --sysroot. Cannot use."
+ exit 1
+endif
+ifeq ($(BR2_arm),y)
+ $(Q)$(call check_arm_abi)
+endif
ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
- @$(call check_uclibc)
+ $(Q)$(call check_uclibc,$(SYSROOT_DIR))
else
- @$(call check_glibc)
+ $(Q)$(call check_glibc,$(SYSROOT_DIR))
endif
mkdir -p $(TARGET_DIR)/lib
@echo "Copy external toolchain libraries to target..."
- @$(call copy_toolchain_lib_root, $(EXTERNAL_LIBC), /lib, $(BR2_TOOLCHAIN_EXTERNAL_STRIP))
- @for libs in $(EXTERNAL_LIBS); do \
- $(call copy_toolchain_lib_root, $$libs, /lib, $(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
+ $(Q)for libs in $(EXTERNAL_LIBS); do \
+ $(call copy_toolchain_lib_root,$(SYSROOT_DIR),$$libs,/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
done
@echo "Copy external toolchain sysroot to staging..."
- @$(call copy_toolchain_sysroot)
+ $(Q)$(call copy_toolchain_sysroot,$(SYSROOT_DIR))
+ @touch $@
diff --git a/toolchain/gcc/4.4.0/100-uclibc-conf.patch b/toolchain/gcc/4.4.1/100-uclibc-conf.patch
index cca8c8229..cca8c8229 100644
--- a/toolchain/gcc/4.4.0/100-uclibc-conf.patch
+++ b/toolchain/gcc/4.4.1/100-uclibc-conf.patch
diff --git a/toolchain/gcc/4.4.0/301-missing-execinfo_h.patch b/toolchain/gcc/4.4.1/301-missing-execinfo_h.patch
index 0e2092f3f..0e2092f3f 100644
--- a/toolchain/gcc/4.4.0/301-missing-execinfo_h.patch
+++ b/toolchain/gcc/4.4.1/301-missing-execinfo_h.patch
diff --git a/toolchain/gcc/4.4.0/302-c99-snprintf.patch b/toolchain/gcc/4.4.1/302-c99-snprintf.patch
index ba51a0e1d..ba51a0e1d 100644
--- a/toolchain/gcc/4.4.0/302-c99-snprintf.patch
+++ b/toolchain/gcc/4.4.1/302-c99-snprintf.patch
diff --git a/toolchain/gcc/4.4.0/305-libmudflap-susv3-legacy.patch b/toolchain/gcc/4.4.1/305-libmudflap-susv3-legacy.patch
index 374b1f865..374b1f865 100644
--- a/toolchain/gcc/4.4.0/305-libmudflap-susv3-legacy.patch
+++ b/toolchain/gcc/4.4.1/305-libmudflap-susv3-legacy.patch
diff --git a/toolchain/gcc/4.4.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/4.4.1/810-arm-softfloat-libgcc.patch
index e6a30a3f0..e6a30a3f0 100644
--- a/toolchain/gcc/4.4.0/810-arm-softfloat-libgcc.patch
+++ b/toolchain/gcc/4.4.1/810-arm-softfloat-libgcc.patch
diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index 9aba2f7d3..76e7f78db 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -105,7 +105,7 @@ config BR2_GCC_VERSION
default "4.3.1" if BR2_GCC_VERSION_4_3_1
default "4.3.2" if BR2_GCC_VERSION_4_3_2
default "4.3.3" if BR2_GCC_VERSION_4_3_3
- default "4.4.0" if BR2_GCC_VERSION_4_4_X
+ default "4.4.1" if BR2_GCC_VERSION_4_4_X
default "4.3" if BR2_GCC_VERSION_4_3
config BR2_TOOLCHAIN_SYSROOT
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 5770081b3..e9249c1c5 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -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.
diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk
index ba8a1f273..29c4c9c0b 100644
--- a/toolchain/gdb/gdb.mk
+++ b/toolchain/gdb/gdb.mk
@@ -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 $@
diff --git a/toolchain/kernel-headers/Config.in b/toolchain/kernel-headers/Config.in
index 13acecc94..f1103f259 100644
--- a/toolchain/kernel-headers/Config.in
+++ b/toolchain/kernel-headers/Config.in
@@ -49,9 +49,9 @@ config BR2_KERNEL_HEADERS_RT
config BR2_DEFAULT_KERNEL_HEADERS
string
default "2.6.26.8" if BR2_KERNEL_HEADERS_2_6_26
- default "2.6.27.26" if BR2_KERNEL_HEADERS_2_6_27
+ default "2.6.27.27" if BR2_KERNEL_HEADERS_2_6_27
default "2.6.28.10" if BR2_KERNEL_HEADERS_2_6_28
default "2.6.29.6" if BR2_KERNEL_HEADERS_2_6_29
- default "2.6.30.1" if BR2_KERNEL_HEADERS_2_6_30
+ default "2.6.30.2" if BR2_KERNEL_HEADERS_2_6_30
default "2.6" if BR2_KERNEL_HEADERS_SNAP
diff --git a/toolchain/patch-kernel.sh b/toolchain/patch-kernel.sh
index e2e89486d..76cb9f753 100755
--- a/toolchain/patch-kernel.sh
+++ b/toolchain/patch-kernel.sh
@@ -21,7 +21,14 @@ if [ ! -d "${patchdir}" ] ; then
fi
for i in `cd ${patchdir}; ls -d ${patchpattern} 2> /dev/null` ; do
- case "$i" in
+ apply="patch -p1 -E -d"
+ uncomp_parm=""
+ if [ -d "${patchdir}/$i" ] ; then
+ type="directory overlay"
+ uncomp="tar cf - --exclude=.svn --no-anchored -C"
+ uncomp_parm="."
+ apply="tar xvf - -C"
+ else case "$i" in
*.gz)
type="gzip"; uncomp="gunzip -dc"; ;;
*.bz)
@@ -32,13 +39,17 @@ for i in `cd ${patchdir}; ls -d ${patchpattern} 2> /dev/null` ; do
type="zip"; uncomp="unzip -d"; ;;
*.Z)
type="compress"; uncomp="uncompress -c"; ;;
+ *.tgz)
+ type="tar gzip"; uncomp="gunzip -dc"; apply="tar xvf - -C"; ;;
+ *.tar)
+ type="tar"; uncomp="cat"; apply="tar xvf - -C"; ;;
*)
type="plaintext"; uncomp="cat"; ;;
- esac
+ esac fi
echo ""
echo "Applying ${i} using ${type}: "
echo ${i} | cat >> ${targetdir}/.applied_patches_list
- ${uncomp} ${patchdir}/${i} | patch -p1 -E -d ${targetdir}
+ ${uncomp} ${patchdir}/${i} ${uncomp_parm} | ${apply} ${targetdir}
if [ $? != 0 ] ; then
echo "Patch failed! Please fix $i!"
exit 1
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index b39b9399b..80d7d9861 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -52,6 +52,7 @@ UCLIBC_TARGET_ARCH:=$(shell $(SHELL) -c "echo $(ARCH) | sed \
-e 's/mipsel.*/mips/' \
-e 's/cris.*/cris/' \
-e 's/nios2.*/nios2/' \
+ -e 's/xtensa.*/xtensa/' \
")
# just handle the ones that can be big or little
UCLIBC_TARGET_ENDIAN:=$(shell $(SHELL) -c "echo $(ARCH) | sed \