From 6c6829a0610e6282be922183c9601cb2365df9a4 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Mon, 24 Oct 2016 21:48:57 +0000 Subject: xtensa: fix endianness support To build uClibc correctly we need correct endianness selected in the crosstool-NG. Xtensa cores may be little- or big-endian, but this property is static. The toolchain knows the core endianness and doesn't need options to select it. Enable ARCH_SUPPORTS_BOTH_ENDIAN and select LE by default. Specify empty CT_ARCH_ENDIAN_CFLAG so that -m{big,little}-endian don't get added to the TARGET_CFLAGS, as it's not supported by gcc. Specify empty CT_ARCH_ENDIAN_LDFLAG so that -EB/-EL don't get added to the TARGET_LDFLAGS as they are ignored. Select big-endian in the example xtensa-unknown-linux-uclibc configuration. This fixes uClibc toolchain build for little-endian cores. Signed-off-by: Max Filippov --- scripts/build/arch/xtensa.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/build/arch') diff --git a/scripts/build/arch/xtensa.sh b/scripts/build/arch/xtensa.sh index a3010c69..bf94ddfa 100644 --- a/scripts/build/arch/xtensa.sh +++ b/scripts/build/arch/xtensa.sh @@ -3,6 +3,8 @@ CT_DoArchTupleValues() { # The architecture part of the tuple: CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_SUFFIX}" + CT_ARCH_ENDIAN_CFLAG="" + CT_ARCH_ENDIAN_LDFLAG="" # The system part of the tuple: case "${CT_LIBC}" in *glibc) CT_TARGET_SYS=gnu;; -- cgit v1.2.3