From 877509762cf49f1f34921718f114de19ff8eedf1 Mon Sep 17 00:00:00 2001 From: Stuart Ianna Date: Tue, 24 Oct 2023 10:22:14 +1100 Subject: [PATCH] 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