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/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 877509762 import/mk: Use libm from the export package when defined.
877509762 is described below

commit 877509762cf49f1f34921718f114de19ff8eedf1
Author: Stuart Ianna <[email protected]>
AuthorDate: Tue Oct 24 10:22:14 2023 +1100

    import/mk: Use libm from the export package when defined.
    
    Nuttx exports libm.a when `CONFIG_LIBM` is enabled. Adjust the application 
import makefile to pick this up when linking.
---
 import/Make.defs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/import/Make.defs b/import/Make.defs
index b86a39640..19aab43b2 100644
--- a/import/Make.defs
+++ b/import/Make.defs
@@ -70,12 +70,14 @@ ifeq ($(CONFIG_BUILD_KERNEL),y)
   ifeq ($(CONFIG_HAVE_CXX),y)
     LDLIBS += -lxx
   endif
-ifneq ($(CONFIG_LIBM),y)
+ifeq ($(CONFIG_LIBM_TOOLCHAIN),y)
   LIBM = ${shell "$(CC)" $(ARCHCPUFLAGS) --print-file-name=libm.a}
 ifneq ($(LIBM),".")
   LDLIBPATH += -L "${shell dirname $(LIBM)}"
   LDLIBS += -lm
 endif
+else ifneq($(CONFIG_LIBM_NONE),)
+  LDLIBS += -lm
 endif
 endif
 

Reply via email to