Skip to content

Commit 829b04c

Browse files
committed
change linking stage (dependencies), print built hex file name
1 parent 9e50355 commit 829b04c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/export/cmake/CMakeLists.txt.tmpl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ SET_TARGET_PROPERTIES({{name}} PROPERTIES ENABLE_EXPORTS 1)
5555
TARGET_LINK_LIBRARIES({{name}}
5656
{% for libname in dependencies.keys()|sort(reverse=true) %}{{libname}}
5757
{% endfor %})
58-
# add dependencies for stdc++, c and nosys so the linker stage works
59-
TARGET_LINK_LIBRARIES({{name}} stdc++ c nosys)
58+
# add syslibs dependencies to create the correct linker order
59+
TARGET_LINK_LIBRARIES({{name}} {{ld_sys_libs|join(" ")}})
6060

6161
{% if pp -%}
6262
add_custom_command(TARGET {{name}} PRE_LINK
@@ -68,6 +68,7 @@ add_custom_command(TARGET {{name}} PRE_LINK
6868

6969
add_custom_command(TARGET {{name}} POST_BUILD
7070
COMMAND ${ELF2BIN} -O ihex $<TARGET_FILE:{{name}}> $<TARGET_FILE:{{name}}>.hex
71+
COMMAND ${CMAKE_COMMAND} -E echo "-- built: $<TARGET_FILE:{{name}}>.hex"
7172
)
7273

7374

0 commit comments

Comments
 (0)