Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmake/compiler/arcmwdt/target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
find_program(CMAKE_C_COMPILER ${CROSS_COMPILE}ccac PATHS ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)
find_program(CMAKE_CXX_COMPILER ${CROSS_COMPILE}ccac PATHS ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)
find_program(CMAKE_ASM_COMPILER ${CROSS_COMPILE}ccac PATHS ${TOOLCHAIN_HOME} NO_DEFAULT_PATH)

# The CMAKE_REQUIRED_FLAGS variable is used by check_c_compiler_flag()
# (and other commands which end up calling check_c_source_compiles())
# to add additional compiler flags used during checking. These flags
Expand Down Expand Up @@ -37,7 +38,7 @@ set(LLEXT_REMOVE_FLAGS
# (check_c_compiler_flag function which we wrap with target_cc_option in extensions.cmake)
# we rely on default MWDT header locations and don't manually specify headers directories.

# common compile options, no copyright msg, little-endian, no small data,
# Common compile options: no copyright message, little-endian, no small data,
# no MWDT stack checking
list(APPEND TOOLCHAIN_C_FLAGS -Hnocopyr -HL -Hnosdata)

Expand All @@ -58,3 +59,7 @@ endif()
if(CONFIG_RISCV)
list(APPEND TOOLCHAIN_C_FLAGS -D__MW_ASM_RV_MACRO__)
endif()

# The MWDT compiler doesn't need to pass any properties to the linker as for now
function(compiler_set_linker_properties)
endfunction()
7 changes: 7 additions & 0 deletions cmake/linker/arcmwdt/target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,10 @@ macro(toolchain_ld_relocation)
${ZEPHYR_BASE}/kernel/include ${ARCH_DIR}/${ARCH}/include)
target_link_libraries(code_relocation_source_lib zephyr_interface)
endmacro()

# Function to map compiler flags into suitable linker flags
# When using the compiler driver to run the linker, just pass
# them all through
function(toolchain_linker_add_compiler_options)
add_link_options(${ARGV})
endfunction()