cmake: Use CMAKE_LINKER to link nuttx.rel for macOS

Otherwise, it produces a lot of warnings like:
```
ld: warning: object file (/Users/yamamoto/git/nuttx/nuttx/build/libs/libxx/liblibcxx.a(d2s.cpp.o)) was built for newer macOS version (12.7) than being linked (12.0)
```
This commit is contained in:
YAMAMOTO Takashi 2024-01-05 18:08:50 +09:00 committed by Xiang Xiao
parent e0c4e292bf
commit 595a0aa5fb
1 changed files with 1 additions and 1 deletions

View File

@ -692,7 +692,7 @@ else()
add_custom_command(
OUTPUT nuttx.rel
COMMAND
${CMAKE_C_COMPILER} ARGS -r $<$<BOOL:${CONFIG_SIM_M32}>:-m32>
${CMAKE_LINKER} ARGS -r $<$<BOOL:${CONFIG_SIM_M32}>:-m32>
$<TARGET_OBJECTS:sim_head> $<$<NOT:$<BOOL:${APPLE}>>:-Wl,--start-group>
${nuttx_libs_paths} ${nuttx_extra_libs}
$<$<NOT:$<BOOL:${APPLE}>>:-Wl,--end-group> -o nuttx.rel