Kbuild: optionally build minimal c library
Change-Id: Ib949ec199ba0dec3c5a1a1a6c9fbf355efcc8104 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
527aca9f73
commit
3b9199d5d4
7
Kconfig
7
Kconfig
|
@ -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
|
||||
|
|
12
Makefile
12
Makefile
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue