uClibc: use BR2_ENDIAN to simplify endianess selection
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 4 Sep 2012 04:09:53 +0000 (04:09 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 4 Sep 2012 20:03:51 +0000 (22:03 +0200)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
toolchain/uClibc/uclibc.mk

index 9d0b6db94ac597f53a26e470b02da6bbadf32f9e..583d199ffcaedab356471a6fb985f744bb998340 100644 (file)
@@ -41,22 +41,9 @@ UCLIBC_TARGET_ARCH:=$(shell $(SHELL) -c "echo $(ARCH) | sed \
                -e 's/cris.*/cris/' \
                -e 's/xtensa.*/xtensa/' \
 ")
-# just handle the ones that can be big or little
-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/' \
-               -e 's/sh.*eb/BIG/' \
-               -e 's/sh.*/LITTLE/' \
-               -e 's/sparc.*/BIG/' \
-")
 
-ifneq ($(UCLIBC_TARGET_ENDIAN),LITTLE)
-ifneq ($(UCLIBC_TARGET_ENDIAN),BIG)
-UCLIBC_TARGET_ENDIAN:=
-endif
-endif
+UCLIBC_TARGET_ENDIAN:=$(call qstrip,$(BR2_ENDIAN))
+
 ifeq ($(UCLIBC_TARGET_ENDIAN),LITTLE)
 UCLIBC_NOT_TARGET_ENDIAN:=BIG
 else