From bd5fbd22c22c5d9e8c73908d5b32a6f682141f08 Mon Sep 17 00:00:00 2001 From: Eyck-Alexander Jentzsch Date: Wed, 18 Nov 2026 10:55:08 +0100 Subject: [PATCH] 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 --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b73824a..d98354d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 $ ${CMAKE_BINARY_DIR}/${TARGET}.hex