cmake: set big-endian flags to TOOLCHAIN_*_FLAGS
Set -big-endian to both compiler and linker flags if CONFIG_BIG_ENDIAN is set. Signed-off-by: Tavish Naruka <t-naruka@ispace-inc.com>
This commit is contained in:
parent
b5ee4c0500
commit
b1af1928f8
2 changed files with 8 additions and 2 deletions
|
@ -186,8 +186,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
|
||||
|
|
|
@ -10,6 +10,11 @@ endif()
|
|||
|
||||
list(APPEND ARM_C_FLAGS -mabi=aapcs)
|
||||
|
||||
if(CONFIG_BIG_ENDIAN)
|
||||
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})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue