feat(newlib): Add newlib library and header file

This commit is contained in:
Dong Heng
2018-05-11 16:10:26 +08:00
parent bc0c7eb5b2
commit 58a66a3d39
110 changed files with 14857 additions and 0 deletions

View File

@ -2,3 +2,27 @@
# Component Makefile
#
COMPONENT_SRCDIRS := .
ifdef CONFIG_NEWLIB_ENABLE
ADD_NEW_NEWLIB := 0
ifdef CONFIG_NEWLIB_LIBRARY_LEVEL_NORMAL
LIBC_PATH := $(COMPONENT_PATH)/newlib/lib/libc.a
LIBM_PATH := $(COMPONENT_PATH)/newlib/lib/libm.a
ADD_NEW_NEWLIB := 1
else
ifdef NEWLIB_LIBRARY_LEVEL_NANO
LIBC_PATH := $(COMPONENT_PATH)/newlib/lib/libc_nano.a
LIBM_PATH := $(COMPONENT_PATH)/newlib/lib/libm.a
ADD_NEW_NEWLIB := 1
endif
endif
ifeq ($(ADD_NEW_NEWLIB),1)
COMPONENT_ADD_INCLUDEDIRS += newlib/include
COMPONENT_ADD_LDFLAGS := $(LIBC_PATH) $(LIBM_PATH) -lnewlib
COMPONENT_ADD_LINKER_DEPS := $(LIBC_PATH) $(LIBM_PATH)
endif
endif