disables defaultlibs as other compilers might trying to link against them

This is for example the case for the apt riscv64-gcc that comes with ubuntu 24.04
This commit is contained in:
alex committed 2026-11-18 10:55:08 +01:00
1 parent fa665fcc2e
commit bd5fbd22c2
1 file changed
+3 -1
+3 -1
View File
@@ -75,7 +75,9 @@ function(setup_target TARGET)
target_link_options(${TARGET} PUBLIC -T ${TARGET_MEM}.lds)
target_link_options(${TARGET} PRIVATE
-Wl,-Map=${CMAKE_BINARY_DIR}/${TARGET}.map)
-Wl,-Map=${CMAKE_BINARY_DIR}/${TARGET}.map
-nodefaultlibs
)
add_custom_command(TARGET ${TARGET} POST_BUILD
COMMAND ${OBJCOPY} -O ihex $<TARGET_FILE:${TARGET}> ${CMAKE_BINARY_DIR}/${TARGET}.hex