2019-03-08 02:07:50 -05:00
|
|
|
ifdef CONFIG_NEWLIB_NANO_FORMAT
|
|
|
|
LIBC := c_nano
|
|
|
|
else # CONFIG_NEWLIB_NANO_FORMAT
|
|
|
|
LIBC := c
|
|
|
|
endif # CONFIG_NEWLIB_NANO_FORMAT
|
|
|
|
|
2019-04-01 03:21:12 -04:00
|
|
|
# Order of linking matters: libnewlib.a should go before libc.a
|
|
|
|
COMPONENT_ADD_LDFLAGS := -lnewlib -l$(LIBC) -lm
|
2019-03-08 02:07:50 -05:00
|
|
|
COMPONENT_ADD_INCLUDEDIRS := platform_include
|
|
|
|
|
|
|
|
ifdef CONFIG_SPIRAM_CACHE_WORKAROUND
|
|
|
|
COMPONENT_ADD_LDFRAGMENTS := esp32-spiram-rom-functions-c.lf
|
|
|
|
endif
|
|
|
|
|
2020-06-22 23:53:58 -04:00
|
|
|
COMPONENT_PRIV_INCLUDEDIRS := priv_include
|
|
|
|
COMPONENT_SRCDIRS := . port
|
|
|
|
|
2021-05-26 09:18:57 -04:00
|
|
|
# Forces the linker to include heap, syscalls, pthread, and assert from this component,
|
2019-04-01 03:21:12 -04:00
|
|
|
# instead of the implementations provided by newlib.
|
|
|
|
COMPONENT_ADD_LDFLAGS += -u newlib_include_heap_impl
|
|
|
|
COMPONENT_ADD_LDFLAGS += -u newlib_include_syscalls_impl
|
2021-05-26 09:18:57 -04:00
|
|
|
COMPONENT_ADD_LDFLAGS += -u newlib_include_pthread_impl
|
|
|
|
COMPONENT_ADD_LDFLAGS += -u newlib_include_assert_impl
|
2019-03-17 23:47:00 -04:00
|
|
|
|
2019-04-01 03:21:12 -04:00
|
|
|
COMPONENT_ADD_LDFRAGMENTS += newlib.lf
|
|
|
|
|
|
|
|
heap.o: CFLAGS += -fno-builtin
|