Kbuild: optionally build minimal c library

Change-Id: Ib949ec199ba0dec3c5a1a1a6c9fbf355efcc8104
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2015-05-18 09:00:49 -04:00
parent 527aca9f73
commit 3b9199d5d4
2 changed files with 15 additions and 4 deletions

View file

@ -17,6 +17,13 @@ config CROSS_COMPILE
directory to select the cross-compiler automatically.
endmenu
config MINIMAL_LIBC
bool
prompt "Build minimal c library"
default y
help
Build integrated minimal c library.
menu "Debugging Options"
config STDOUT_CONSOLE

View file

@ -385,7 +385,6 @@ CFLAGS_KERNEL =
AFLAGS_KERNEL =
CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
STDINCLUDE := -I$(srctree)/lib/libc/minimal/include
# Use USERINCLUDE when you must reference the UAPI directories only.
USERINCLUDE := -include $(CURDIR)/include/generated/autoconf.h
@ -575,11 +574,9 @@ scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \
asm-generic
$(Q)$(MAKE) $(build)=$(@)
# Objects we will link into tinymountain / subdirs we need to visit
KLIBC_DIR := lib/libc/minimal
core-y := arch/ kernel/ misc/ net/
bsp-y := drivers/
libs-y := $(KLIBC_DIR)/
ifneq ($(strip $(PROJECT)),)
core-y += $(SOURCE_DIR)
@ -626,6 +623,13 @@ else
include/config/auto.conf: ;
endif # $(dot-config)
ifdef CONFIG_MINIMAL_LIBC
# Objects we will link into tinymountain / subdirs we need to visit
KLIBC_DIR := lib/libc/minimal
libs-y := $(KLIBC_DIR)/
TIMOINCLUDE += -I$(srctree)/lib/libc/minimal/include
endif
#File that includes all prepare special embedded architecture targets.
include $(srctree)/scripts/Makefile.preparch
sinclude $(srctree)/scripts/Makefile.$(SRCARCH).preparch