From c425c546c0f149560c778595c1a20a88a444711f Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sat, 13 Mar 2021 21:23:41 +0900 Subject: xtensa: move CONFIG_CPU_*_ENDIAN defines to Kconfig Move the definition of CONFIG_CPU_*_ENDIAN to Kconfig, the best place for CONFIG options. I slightly simplified the test code. You can use the -P option to suppress linemarker generation. The grep command is unneeded. $ echo __XTENSA_EB__ | xtensa-linux-gcc -E - # 1 "" # 1 "" # 1 "" # 1 "" 1 $ echo __XTENSA_EB__ | xtensa-linux-gcc -E -P - 1 Signed-off-by: Masahiro Yamada Message-Id: <20210313122342.69995-1-masahiroy@kernel.org> Signed-off-by: Max Filippov --- arch/xtensa/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/xtensa/Kconfig') diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index a99dc39f6964..d637b396f81c 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -84,6 +84,12 @@ config KASAN_SHADOW_OFFSET hex default 0x6e400000 +config CPU_BIG_ENDIAN + def_bool $(success,test "$(shell,echo __XTENSA_EB__ | $(CC) -E -P -)" = 1) + +config CPU_LITTLE_ENDIAN + def_bool !CPU_BIG_ENDIAN + menu "Processor type and features" choice -- cgit