cmake: add MIPS support
This commit defines the toolchain command line options for the Zephyr MIPS architectural port. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Remy Luisant <remy@luisant.ca>
This commit is contained in:
parent
0369998e61
commit
436066e3c4
2 changed files with 21 additions and 0 deletions
|
@ -59,6 +59,8 @@ elseif("${ARCH}" STREQUAL "x86")
|
|||
include(${CMAKE_CURRENT_LIST_DIR}/target_x86.cmake)
|
||||
elseif("${ARCH}" STREQUAL "sparc")
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/target_sparc.cmake)
|
||||
elseif("${ARCH}" STREQUAL "mips")
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/target_mips.cmake)
|
||||
endif()
|
||||
|
||||
# This libgcc code is partially duplicated in compiler/*/target.cmake
|
||||
|
|
19
cmake/compiler/gcc/target_mips.cmake
Normal file
19
cmake/compiler/gcc/target_mips.cmake
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Copyright (c) 2021 Antony Pavlov <antonynpavlov@gmail.com>
|
||||
# Copyright (c) 2021 Remy Luisant <remy@luisant.ca>
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if(CONFIG_BIG_ENDIAN)
|
||||
list(APPEND TOOLCHAIN_C_FLAGS -EB)
|
||||
list(APPEND TOOLCHAIN_LD_FLAGS -EB)
|
||||
else()
|
||||
list(APPEND TOOLCHAIN_C_FLAGS -EL)
|
||||
list(APPEND TOOLCHAIN_LD_FLAGS -EL)
|
||||
endif()
|
||||
|
||||
list(APPEND TOOLCHAIN_C_FLAGS -msoft-float)
|
||||
list(APPEND TOOLCHAIN_LD_FLAGS -msoft-float)
|
||||
|
||||
list(APPEND TOOLCHAIN_C_FLAGS -G0 -mno-gpopt -fno-pic)
|
||||
|
||||
list(APPEND TOOLCHAIN_C_FLAGS -pipe)
|
Loading…
Add table
Add a link
Reference in a new issue