arch: add big endian support
This patch adds Big Endian architecture support. Even if a compiler
generating big endian object files is used, our linker script, or
include/linker/linker-tool-gcc.h to be precise, has default output
format as little endian.
This patch adds a hidden config CONFIG_BIG_ENDIAN, which should be set
by big endian architectures or a SoC's, and adds an condition to
switch OUTPUT_FORMAT in our linker.cmd.
Signed-off-by: Yasushi SHOJI <y-shoji@ispace-inc.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9ca8a20..31c3724 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -772,6 +772,7 @@
--output-source isr_tables.c
--kernel $<TARGET_FILE:zephyr_prebuilt>
--intlist isrList.bin
+ $<$<BOOL:${CONFIG_BIG_ENDIAN}>:--big-endian>
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--debug>
${GEN_ISR_TABLE_EXTRA_ARG}
DEPENDS zephyr_prebuilt