build/cmake: allow gcc-riscv64-unknown-elf for PROTECTED

This allows using Ubuntu stock gcc-riscv64-unknown-elf 10.2
toolchain for PROTECTED build with cmake.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
Yanfeng Liu 2024-07-14 08:42:29 +08:00 committed by Xiang Xiao
parent 01c37f7012
commit bba82bea89
1 changed files with 5 additions and 0 deletions

View File

@ -812,6 +812,11 @@ if(CONFIG_BUILD_PROTECTED)
$<$<BOOL:${CONFIG_HAVE_CXX}>:supc++>
$<$<NOT:$<BOOL:${APPLE}>>:-Wl,--end-group>)
target_include_directories(
nuttx_user SYSTEM
PRIVATE ${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include
${CMAKE_BINARY_DIR}/include_arch)
add_custom_command(
OUTPUT User.map
COMMAND ${CMAKE_NM} nuttx_user > User.map