Discussion:
[ORLinux] [PATCH v3] arch: Kconfig: Let all architectures set endian explicitly
Max Filippov
2014-08-15 01:47:15 UTC
Permalink
Hi Chen,
- Big endian: avr32, frv, m68k, openrisc, parisc, s390, sparc
- Little endian: alpha, blackfin, cris, hexagon, ia64, metag, mn10300,
score, unicore32, x86
- Choose in config time: arc, arm, arm64, c6x, m32r, mips, powerpc, sh
- Deside by compiler: microblaze, tile, xtensa.
- Deside by building host: um
- Next, need improve Kbuild to probe endian to deside whether need mark
__BUILDING_TIME_BIG_ENDIAN__ before real config.
[...]
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 3a617af..a3e8f7e 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -22,6 +22,8 @@ config XTENSA
select HAVE_IRQ_TIME_ACCOUNTING
select HAVE_PERF_EVENTS
select COMMON_CLK
+ select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
+ select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
help
Xtensa processors are 32-bit RISC machines designed by Tensilica
primarily for embedded systems. These processors are both
I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't
find anything related to __BUILDING_TIME_BIG_ENDIAN__. Am I missing
something?
--
Thanks.
-- Max
Max Filippov
2014-08-15 01:52:09 UTC
Permalink
Post by Max Filippov
Hi Chen,
- Big endian: avr32, frv, m68k, openrisc, parisc, s390, sparc
- Little endian: alpha, blackfin, cris, hexagon, ia64, metag, mn10300,
score, unicore32, x86
- Choose in config time: arc, arm, arm64, c6x, m32r, mips, powerpc, sh
- Deside by compiler: microblaze, tile, xtensa.
- Deside by building host: um
- Next, need improve Kbuild to probe endian to deside whether need mark
__BUILDING_TIME_BIG_ENDIAN__ before real config.
[...]
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 3a617af..a3e8f7e 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -22,6 +22,8 @@ config XTENSA
select HAVE_IRQ_TIME_ACCOUNTING
select HAVE_PERF_EVENTS
select COMMON_CLK
+ select CPU_BIG_ENDIAN if __BUILDING_TIME_BIG_ENDIAN__
+ select CPU_LITTLE_ENDIAN if !CPU_BIG_ENDIAN
help
Xtensa processors are 32-bit RISC machines designed by Tensilica
primarily for embedded systems. These processors are both
I've tested this part and it doesn't select neither CPU_BIG_ENDIAN,
nor CPU_LITTLE_ENDIAN. And looking into the Kconfig/Kbuild I cound't
Correction: it always selects CPU_LITTLE_ENDIAN, regardless of the
compiler endianness.
Post by Max Filippov
find anything related to __BUILDING_TIME_BIG_ENDIAN__. Am I missing
something?
--
Thanks.
-- Max
Loading...