diff --git a/components/newlib/CMakeLists.txt b/components/newlib/CMakeLists.txt index a7b29c6548..d541b87bf2 100644 --- a/components/newlib/CMakeLists.txt +++ b/components/newlib/CMakeLists.txt @@ -30,3 +30,5 @@ register_component() target_link_libraries(newlib "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib") target_link_libraries(newlib ${LIBC} ${LIBM}) + +set_source_files_properties(syscalls.c PROPERTIES COMPILE_FLAGS -fno-builtin) diff --git a/components/newlib/component.mk b/components/newlib/component.mk index 05ef6bee8d..4db4acd00e 100644 --- a/components/newlib/component.mk +++ b/components/newlib/component.mk @@ -20,3 +20,5 @@ COMPONENT_ADD_LDFLAGS := $(LIBC_PATH) $(LIBM_PATH) -lnewlib COMPONENT_ADD_LINKER_DEPS := $(LIBC_PATH) $(LIBM_PATH) COMPONENT_ADD_INCLUDEDIRS := platform_include include + +syscalls.o: CFLAGS += -fno-builtin