diff --git a/components/app_trace/CMakeLists.txt b/components/app_trace/CMakeLists.txt index e982d1911..3ee0ff655 100644 --- a/components/app_trace/CMakeLists.txt +++ b/components/app_trace/CMakeLists.txt @@ -39,4 +39,4 @@ target_compile_options(${COMPONENT_LIB} PRIVATE "-fno-profile-arcs" "-fno-test-c # Force app_trace to also appear later than gcov in link line idf_component_get_property(app_trace app_trace COMPONENT_LIB) -target_link_libraries(${COMPONENT_LIB} INTERFACE $ gcov $ ${LIBC}) +target_link_libraries(${COMPONENT_LIB} INTERFACE $ gcov $ c) diff --git a/components/newlib/CMakeLists.txt b/components/newlib/CMakeLists.txt index d801910c2..cac5347de 100644 --- a/components/newlib/CMakeLists.txt +++ b/components/newlib/CMakeLists.txt @@ -25,7 +25,7 @@ idf_component_register(SRCS "${srcs}" # Toolchain libraries require code defined in this component idf_component_get_property(newlib newlib COMPONENT_LIB) -target_link_libraries(${COMPONENT_LIB} INTERFACE ${LIBC} ${LIBM} gcc "$") +target_link_libraries(${COMPONENT_LIB} INTERFACE c m gcc "$") set_source_files_properties(heap.c PROPERTIES COMPILE_FLAGS -fno-builtin) @@ -36,3 +36,7 @@ list(APPEND EXTRA_LINK_FLAGS "-u newlib_include_heap_impl") list(APPEND EXTRA_LINK_FLAGS "-u newlib_include_syscalls_impl") list(APPEND EXTRA_LINK_FLAGS "-u newlib_include_pthread_impl") target_link_libraries(${COMPONENT_LIB} INTERFACE "${EXTRA_LINK_FLAGS}") + +if(CONFIG_NEWLIB_NANO_FORMAT) + target_link_libraries(${COMPONENT_LIB} INTERFACE "--specs=nano.specs") +endif() diff --git a/components/newlib/project_include.cmake b/components/newlib/project_include.cmake deleted file mode 100644 index 4a1784908..000000000 --- a/components/newlib/project_include.cmake +++ /dev/null @@ -1,7 +0,0 @@ -if(CONFIG_NEWLIB_NANO_FORMAT) - set(LIBC c_nano) -else() - set(LIBC c) -endif() - -set(LIBM m)