You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/01/06 12:22:00 UTC
(nuttx) 02/05: cmake: Use CMAKE_LINKER to link nuttx.rel for macOS
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 595a0aa5fb26c4af5ff1d53fe04fec3eda82a4cb
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Jan 5 18:08:50 2024 +0900
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 $<$<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