Makefile, import/Make.defs: Fix undefined symbols for CONFIG_BUILD_KERNEL=y

Summary:
- I noticed that applications made by 'make import' contain
  undefined symbols such as printf for CONFIG_BUILD_KERNEL=y
- This commit fixes this issue by adding user libraries.
- Also, this commit generates libapps.a which is used for init

Impact:
- CONFIG_BUILD_KERNEL=y only

Testing:
- Build (mkimport, make import) with sama5d4-ek:knsh

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2022-01-26 09:42:34 +09:00 committed by Xiang Xiao
parent 3c556384ea
commit 7d4b2a517b
2 changed files with 10 additions and 0 deletions

View file

@ -74,6 +74,12 @@ else
LDLIBPATH = -L $(TOPDIR)$(DELIM)libs
endif
# Link with user libraries
ifeq ($(CONFIG_BUILD_KERNEL),y)
LDLIBS = -lapps -lxx -lmm -lc -lm -lproxies
endif
# Try to get the path to libgcc.a. Of course, this only works for GCC
# toolchains.