1ifdef CONFIG_NEWLIB_NANO_FORMAT 2LIBC := c_nano 3else # CONFIG_NEWLIB_NANO_FORMAT 4LIBC := c 5endif # CONFIG_NEWLIB_NANO_FORMAT 6 7# Order of linking matters: libnewlib.a should go before libc.a 8COMPONENT_ADD_LDFLAGS := -lnewlib -l$(LIBC) -lm 9COMPONENT_ADD_INCLUDEDIRS := platform_include 10 11ifdef CONFIG_SPIRAM_CACHE_WORKAROUND 12COMPONENT_ADD_LDFRAGMENTS := esp32-spiram-rom-functions-c.lf 13endif 14 15COMPONENT_PRIV_INCLUDEDIRS := priv_include 16COMPONENT_SRCDIRS := . port 17 18# Forces the linker to include heap, syscalls, and pthread from this component, 19# instead of the implementations provided by newlib. 20COMPONENT_ADD_LDFLAGS += -u newlib_include_heap_impl 21COMPONENT_ADD_LDFLAGS += -u newlib_include_syscalls_impl 22 23COMPONENT_ADD_LDFRAGMENTS += newlib.lf 24 25heap.o: CFLAGS += -fno-builtin 26