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 <jcmvbkbc@gmail.com>
This commit is contained in:
Max Filippov 2016-10-24 21:48:57 +00:00
parent 0946ce59a0
commit 6c6829a061
3 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,8 @@
# xtensa specific configuration file
## select ARCH_SUPPORTS_32
## select ARCH_SUPPORTS_BOTH_ENDIAN
## select ARCH_DEFAULT_LE
## select ARCH_SUPPORTS_BOTH_MMU
## select ARCH_DEFAULT_HAS_MMU
##

View File

@ -1,6 +1,7 @@
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
CT_SAVE_TARBALLS=y
CT_LOG_EXTRA=y
CT_ARCH_BE=y
CT_ARCH_xtensa=y
CT_KERNEL_linux=y
CT_LIBC_uClibc=y

View File

@ -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;;