mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
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.
This commit is contained in:
parent
a21476beab
commit
877509762c
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue