component.mk 793 B

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