Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,9 @@ config BIG_ENDIAN
Little-endian architecture is the default and should leave this option
unselected. This option is selected by arch/$ARCH/Kconfig,
soc/**/Kconfig, or boards/**/Kconfig and the user should generally avoid
modifying it. The option is used to select linker script OUTPUT_FORMAT
and command line option for gen_isr_tables.py.
modifying it. The option is used to select linker script OUTPUT_FORMAT,
the toolchain flags (TOOLCHAIN_C_FLAGS, TOOLCHAIN_LD_FLAGS), and command
line option for gen_isr_tables.py.

config LITTLE_ENDIAN
# Hidden Kconfig option representing the default little-endian architecture
Expand Down
5 changes: 5 additions & 0 deletions cmake/compiler/gcc/target_arm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ endif()

list(APPEND ARM_C_FLAGS -mabi=aapcs)

if(CONFIG_BIG_ENDIAN)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently BIG_ENDIAN is a promptless symbol, meaning it depends on something having a select BIG_ENDIAN (or a change of default).

Currently the arch for which that is done is SPARC:

config SPARC

select BIG_ENDIAN

so how is this expected to be selected for arm v7-r and thus selecting this code path ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be no board with such a combination, but I am working on porting zephyr to TI TMS570. Seems like a couple more people have out of tree support for these, see: #72696

Since SPARC toolchain is simply big-endian only, these flags not being passed to it may not matter, so we do not see problem (I think).

list(APPEND TOOLCHAIN_C_FLAGS -mbig-endian)
list(APPEND TOOLCHAIN_LD_FLAGS -mbig-endian)
endif()

if(CONFIG_FPU)
list(APPEND ARM_C_FLAGS -mfpu=${GCC_M_FPU})

Expand Down