You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/01/30 10:00:26 UTC
[incubator-nuttx-apps] branch master updated: import: Make.defs: Fix 'make import' for CONFIG_BUILD_KERNEL=y
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new cecc83d import: Make.defs: Fix 'make import' for CONFIG_BUILD_KERNEL=y
cecc83d is described below
commit cecc83d6b92b05033cfeac6d49c7d46d8dda56da
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Sun Jan 30 11:15:22 2022 +0900
import: Make.defs: Fix 'make import' for CONFIG_BUILD_KERNEL=y
Summary:
- I noticed that 'make import' failed due to recent changes in nuttx
- This commit fixes this issue by adding logic for -lm
- Also applies the same style for -lgcc
Impact:
- CONFIG_BUILD_KERNEL=y only
Testing:
- Build (mkimport, make import) with sama5d4-ek:knsh
Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
import/Make.defs | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/import/Make.defs b/import/Make.defs
index 0d8d153..6ecfdc6 100644
--- a/import/Make.defs
+++ b/import/Make.defs
@@ -77,14 +77,21 @@ endif
# Link with user libraries
ifeq ($(CONFIG_BUILD_KERNEL),y)
- LDLIBS = -lapps -lxx -lmm -lc -lm -lproxies
+ LDLIBS = -lapps -lxx -lmm -lc -lproxies
+ifneq ($(CONFIG_LIBM),y)
+ LIBM = ${shell "$(CC)" $(ARCHCPUFLAGS) --print-file-name=libm.a}
+ifneq ($(LIBM),".")
+ LDLIBPATH += -L "${shell dirname $(LIBM)}"
+ LDLIBS += -lm
+endif
+endif
endif
# Try to get the path to libgcc.a. Of course, this only works for GCC
# toolchains.
-LIBGCC = ${shell "$(CC)" $(ARCHCPUFLAGS) -print-file-name=libgcc.a}
-ifneq ($(LIBGCC),)
+LIBGCC = ${shell "$(CC)" $(ARCHCPUFLAGS) --print-file-name=libgcc.a}
+ifneq ($(LIBGCC),".")
LDLIBPATH += -L "${shell dirname $(LIBGCC)}"
LDLIBS += -lgcc
endif