zephyr/arch/nios2/CMakeLists.txt
Anas Nashif 696aa869d5 nios2: move soc to top-level dir soc/
Move the SoC outside of the architecture tree and put them at the same
level as boards and architectures allowing both SoCs and boards to be
maintained outside the tree.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-09-13 00:56:48 -04:00

36 lines
682 B
CMake

if(CONFIG_GP_NONE)
set(gpopt none)
elseif(CONFIG_GP_LOCAL)
set(gpopt local)
elseif(CONFIG_GP_GLOBAL)
set(gpopt global)
elseif(CONFIG_GP_ALL_DATA)
set(gpopt data)
endif()
# Set Global Pointer option based on Kconfig.
zephyr_cc_option(-mgpopt=${gpopt})
# TODO Find a way to pull this out of system.h somehow
# instead of having Kconfig for it
if(CONFIG_HAS_MUL_INSTRUCTION)
zephyr_cc_option(-mhw-mul)
else()
zephyr_cc_option(-mno-hw-mul)
endif()
if(CONFIG_HAS_MULX_INSTRUCTION)
zephyr_cc_option(-mhw-mulx)
else()
zephyr_cc_option(-mno-hw-mulx)
endif()
if(CONFIG_HAS_DIV_INSTRUCTION)
zephyr_cc_option(-mhw-div)
else()
zephyr_cc_option(-mno-hw-div)
endif()
add_subdirectory(core)