Skip to content
Closed
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/gcc/target_riscv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ if(CONFIG_COMPRESSED_ISA)
endif()

list(APPEND TOOLCHAIN_C_FLAGS -mabi=${riscv_mabi} -march=${riscv_march})
list(APPEND TOOLCHAIN_LD_FLAGS -mabi=${riscv_mabi} -march=${riscv_march})

# Since TOOLCHAIN_LD_FLAGS eventually gets passed to zephyr_check_compiler_flag
# we need to treat -mabi/-march as a single option. Otherwise
# zephyr_check_compiler_flag will fail on RISC-V since they options are
# expected to be set together.
list(APPEND TOOLCHAIN_LD_FLAGS "-mabi=${riscv_mabi} -march=${riscv_march}")