2019-03-08 07:07:50 +00:00
|
|
|
ifdef CONFIG_NEWLIB_NANO_FORMAT
|
|
|
|
LIBC := c_nano
|
|
|
|
else # CONFIG_NEWLIB_NANO_FORMAT
|
|
|
|
LIBC := c
|
|
|
|
endif # CONFIG_NEWLIB_NANO_FORMAT
|
|
|
|
|
2019-04-01 07:21:12 +00:00
|
|
|
# Order of linking matters: libnewlib.a should go before libc.a
|
|
|
|
COMPONENT_ADD_LDFLAGS := -lnewlib -l$(LIBC) -lm
|
2019-03-08 07:07:50 +00:00
|
|
|
COMPONENT_ADD_INCLUDEDIRS := platform_include
|
|
|
|
|
|
|
|
ifdef CONFIG_SPIRAM_CACHE_WORKAROUND
|
|
|
|
COMPONENT_ADD_LDFRAGMENTS := esp32-spiram-rom-functions-c.lf
|
|
|
|
endif
|
|
|
|
|
2019-04-01 07:21:12 +00:00
|
|
|
# Forces the linker to include locks, heap, and syscalls from this component,
|
|
|
|
# instead of the implementations provided by newlib.
|
2019-03-18 03:47:00 +00:00
|
|
|
COMPONENT_ADD_LDFLAGS += -u newlib_include_locks_impl
|
2019-04-01 07:21:12 +00:00
|
|
|
COMPONENT_ADD_LDFLAGS += -u newlib_include_heap_impl
|
|
|
|
COMPONENT_ADD_LDFLAGS += -u newlib_include_syscalls_impl
|
2019-03-18 03:47:00 +00:00
|
|
|
|
2019-04-01 07:21:12 +00:00
|
|
|
COMPONENT_ADD_LDFRAGMENTS += newlib.lf
|
|
|
|
|
|
|
|
heap.o: CFLAGS += -fno-builtin
|