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 --- samples/xtensa-unknown-linux-uclibc/crosstool.config | 1 + 1 file changed, 1 insertion(+) (limited to 'samples') diff --git a/samples/xtensa-unknown-linux-uclibc/crosstool.config b/samples/xtensa-unknown-linux-uclibc/crosstool.config index e7ab10eb..d383fbd0 100644 --- a/samples/xtensa-unknown-linux-uclibc/crosstool.config +++ b/samples/xtensa-unknown-linux-uclibc/crosstool.config @@ -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 -- cgit v1.2.3 From fdf35a2fa90ed6f190ea678821b1e2378c86c4f6 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Mon, 24 Oct 2016 22:39:00 +0000 Subject: samples: add target CFLAGS to xtensa-unknown-linux-uclibc Add -mlongcalls and -mtext-section-literals to target CFLAGS. Target libraries built with these flags have great call range, useful for linux applications. Signed-off-by: Max Filippov --- samples/xtensa-unknown-linux-uclibc/crosstool.config | 1 + 1 file changed, 1 insertion(+) (limited to 'samples') diff --git a/samples/xtensa-unknown-linux-uclibc/crosstool.config b/samples/xtensa-unknown-linux-uclibc/crosstool.config index d383fbd0..c9e138e5 100644 --- a/samples/xtensa-unknown-linux-uclibc/crosstool.config +++ b/samples/xtensa-unknown-linux-uclibc/crosstool.config @@ -2,6 +2,7 @@ CT_LOCAL_TARBALLS_DIR="${HOME}/src" CT_SAVE_TARBALLS=y CT_LOG_EXTRA=y CT_ARCH_BE=y +CT_TARGET_CFLAGS="-mlongcalls -mtext-section-literals" CT_ARCH_xtensa=y CT_KERNEL_linux=y CT_LIBC_uClibc=y -- cgit v1.2.3 From 51b4a509db982349af6c9b2072b7a6fad0547570 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Wed, 23 Nov 2016 05:14:31 -0800 Subject: samples: rename xtensa-unknown-linux-uclibc to xtensa-fsf-linux-uclibc Put xtensa core name to the tuple vendor string (without any overlay the default core is 'fsf') and rename sample directory accordingly. Signed-off-by: Max Filippov --- samples/xtensa-fsf-linux-uclibc/crosstool.config | 12 ++++++++++++ samples/xtensa-fsf-linux-uclibc/reported.by | 3 +++ samples/xtensa-unknown-linux-uclibc/crosstool.config | 11 ----------- samples/xtensa-unknown-linux-uclibc/reported.by | 3 --- 4 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 samples/xtensa-fsf-linux-uclibc/crosstool.config create mode 100644 samples/xtensa-fsf-linux-uclibc/reported.by delete mode 100644 samples/xtensa-unknown-linux-uclibc/crosstool.config delete mode 100644 samples/xtensa-unknown-linux-uclibc/reported.by (limited to 'samples') diff --git a/samples/xtensa-fsf-linux-uclibc/crosstool.config b/samples/xtensa-fsf-linux-uclibc/crosstool.config new file mode 100644 index 00000000..50336220 --- /dev/null +++ b/samples/xtensa-fsf-linux-uclibc/crosstool.config @@ -0,0 +1,12 @@ +CT_LOCAL_TARBALLS_DIR="${HOME}/src" +CT_SAVE_TARBALLS=y +CT_LOG_EXTRA=y +CT_ARCH_BE=y +CT_TARGET_CFLAGS="-mlongcalls -mtext-section-literals" +CT_ARCH_xtensa=y +CT_TARGET_VENDOR="fsf" +CT_KERNEL_linux=y +CT_LIBC_uClibc=y +CT_LIBC_UCLIBC_WCHAR=y +CT_CC_LANG_CXX=y +CT_DEBUG_gdb=y diff --git a/samples/xtensa-fsf-linux-uclibc/reported.by b/samples/xtensa-fsf-linux-uclibc/reported.by new file mode 100644 index 00000000..7ba89505 --- /dev/null +++ b/samples/xtensa-fsf-linux-uclibc/reported.by @@ -0,0 +1,3 @@ +reporter_name="Max Filippov" +reporter_url="http://wiki.linux-xtensa.org/index.php/Crosstool-NG" +reporter_comment="Xtensa default toolchain" diff --git a/samples/xtensa-unknown-linux-uclibc/crosstool.config b/samples/xtensa-unknown-linux-uclibc/crosstool.config deleted file mode 100644 index c9e138e5..00000000 --- a/samples/xtensa-unknown-linux-uclibc/crosstool.config +++ /dev/null @@ -1,11 +0,0 @@ -CT_LOCAL_TARBALLS_DIR="${HOME}/src" -CT_SAVE_TARBALLS=y -CT_LOG_EXTRA=y -CT_ARCH_BE=y -CT_TARGET_CFLAGS="-mlongcalls -mtext-section-literals" -CT_ARCH_xtensa=y -CT_KERNEL_linux=y -CT_LIBC_uClibc=y -CT_LIBC_UCLIBC_WCHAR=y -CT_CC_LANG_CXX=y -CT_DEBUG_gdb=y diff --git a/samples/xtensa-unknown-linux-uclibc/reported.by b/samples/xtensa-unknown-linux-uclibc/reported.by deleted file mode 100644 index 7ba89505..00000000 --- a/samples/xtensa-unknown-linux-uclibc/reported.by +++ /dev/null @@ -1,3 +0,0 @@ -reporter_name="Max Filippov" -reporter_url="http://wiki.linux-xtensa.org/index.php/Crosstool-NG" -reporter_comment="Xtensa default toolchain" -- cgit v1.2.3