From 595a0aa5fb26c4af5ff1d53fe04fec3eda82a4cb Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 5 Jan 2024 18:08:50 +0900 Subject: [PATCH] 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) ``` --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0364cc8bcf..2b1fd3a1da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -692,7 +692,7 @@ else() add_custom_command( OUTPUT nuttx.rel COMMAND - ${CMAKE_C_COMPILER} ARGS -r $<$:-m32> + ${CMAKE_LINKER} ARGS -r $<$:-m32> $ $<$>:-Wl,--start-group> ${nuttx_libs_paths} ${nuttx_extra_libs} $<$>:-Wl,--end-group> -o nuttx.rel