summaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-02-02 13:50:23 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-02-02 13:50:23 +0000
commit3943f279f053ac9fb87972e224376a9dba46b8eb (patch)
tree909d6f15efb81d92d84c4edd939bd47a7c7c84c9 /toolchain
parenta4bece9efdfe9247b312ac70fd1b6a102c1878ff (diff)
downloadbuildroot-novena-3943f279f053ac9fb87972e224376a9dba46b8eb.tar.gz
buildroot-novena-3943f279f053ac9fb87972e224376a9dba46b8eb.zip
- fixup setting the UCLIBC_TARGET_ENDIAN
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/uClibc/uclibc.mk16
1 files changed, 12 insertions, 4 deletions
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index 0fcd64c2d..d2bd62c63 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -32,7 +32,7 @@ endif
UCLIBC_CAT:=$(BZCAT)
-UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
+UCLIBC_TARGET_ARCH:=$(shell $(SHELL) -c "echo $(ARCH) | sed -e s'/-.*//' \
-e 's/i.86/i386/' \
-e 's/sparc.*/sparc/' \
-e 's/arm.*/arm/g' \
@@ -44,14 +44,14 @@ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
-e 's/mipsel.*/mips/' \
-e 's/cris.*/cris/' \
-e 's/nios2.*/nios2/' \
-)
+")
# just handle the ones that can be big or little
-UCLIBC_TARGET_ENDIAN:=$(shell echo $(ARCH) | sed \
+UCLIBC_TARGET_ENDIAN:=$(shell $(SHELL) -c "echo $(ARCH) | sed \
-e 's/armeb/BIG/' \
-e 's/arm/LITTLE/' \
-e 's/mipsel/LITTLE/' \
-e 's/mips/BIG/' \
-)
+")
ifneq ($(UCLIBC_TARGET_ENDIAN),LITTLE)
ifneq ($(UCLIBC_TARGET_ENDIAN),BIG)
UCLIBC_TARGET_ENDIAN:=
@@ -122,6 +122,14 @@ ifneq ($(UCLIBC_TARGET_ENDIAN),)
-e '/^# ARCH_WANTS_$(UCLIBC_NOT_TARGET_ENDIAN)_ENDIAN /{s,# ,,;s, is not set,=n,g}' \
$(UCLIBC_DIR)/.config
endif
+ifneq ($(UCLIBC_TARGET_ENDIAN),)
+ # The above doesn't work for me, so redo
+ $(SED) 's/.*\(ARCH_$(UCLIBC_NOT_TARGET_ENDIAN)_ENDIAN\).*/# \1 is not set/g' \
+ -e 's/.*\(ARCH_WANTS_$(UCLIBC_NOT_TARGET_ENDIAN)_ENDIAN\).*/# \1 is not set/g' \
+ -e 's/.*\(ARCH_$(UCLIBC_TARGET_ENDIAN)_ENDIAN\).*/\1=y/g' \
+ -e 's/.*\(ARCH_WANTS_$(UCLIBC_TARGET_ENDIAN)_ENDIAN\).*/\1=y/g' \
+ $(UCLIBC_DIR)/.config
+endif
ifeq ($(BR2_LARGEFILE),y)
$(SED) 's,.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=y,g' $(UCLIBC_DIR)/.config
else