1# SPDX-License-Identifier: Apache-2.0
2
3if(EXISTS ${SOC_FULL_DIR}/tune_build_ops.cmake)
4  include(${SOC_FULL_DIR}/tune_build_ops.cmake)
5endif()
6
7if(NOT DEFINED GCC_ARC_TUNED_CPU)
8  set(GCC_ARC_TUNED_CPU ${GCC_M_CPU})
9endif()
10
11# Flags not supported by llext linker
12# (regexps are supported and match whole word)
13set(LLEXT_REMOVE_FLAGS
14  -fno-pic
15  -fno-pie
16  -ffunction-sections
17  -fdata-sections
18  -g.*
19  -Os
20)
21
22list(APPEND TOOLCHAIN_C_FLAGS -mcpu=${GCC_ARC_TUNED_CPU})
23list(APPEND TOOLCHAIN_LD_FLAGS -mcpu=${GCC_ARC_TUNED_CPU})
24