1# SPDX-License-Identifier: Apache-2.0
2
3if(COMPILER STREQUAL gcc)
4  # GNU compiler options
5  zephyr_compile_options(-mno-sdata)
6  zephyr_compile_options_ifdef(CONFIG_FPU -mfpu=fpud_all)
7else()
8  # MWDT compiler options
9   zephyr_compile_options(-arcv2hs -core4 -Xdual_issue -Xcode_density -Hrgf_banked_regs=32 -HL
10    -Xatomic -Xll64 -Xunaligned -Xdiv_rem=radix4 -Xswap -Xbitscan -Xmpy_option=qmpyh -Xshift_assist
11    -Xbarrel_shifter -Xtimer0 -Xtimer1 -Xrtc -Hld_cycles=2)
12
13  zephyr_compile_options_ifdef(CONFIG_FPU -Xfpu_mac -Xfpud_div)
14
15  zephyr_ld_options(-Hlib=hs48_slc_full)
16endif()
17
18set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")
19