py/dynruntime.mk: Fix use of musl's libm.a when LINK_RUNTIME=1.
Like PICOLIBC, MUSL also has its math functions in libc.a. There is a libm.a, but it's empty. Signed-off-by: dubiousjim <dubiousjim@gmail.com>
This commit is contained in:
committed by
Damien George
parent
27f4351f5f
commit
ba4179bb66
@@ -124,6 +124,10 @@ else
|
||||
$(error architecture '$(ARCH)' not supported)
|
||||
endif
|
||||
|
||||
ifneq ($(findstring -musl,$(shell $(CROSS)gcc -dumpmachine)),)
|
||||
USE_MUSL := 1
|
||||
endif
|
||||
|
||||
MICROPY_FLOAT_IMPL_UPPER = $(shell echo $(MICROPY_FLOAT_IMPL) | tr '[:lower:]' '[:upper:]')
|
||||
CFLAGS += $(CFLAGS_ARCH) -DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_$(MICROPY_FLOAT_IMPL_UPPER)
|
||||
|
||||
@@ -147,6 +151,8 @@ ifeq ($(LINK_RUNTIME),1)
|
||||
# distribution.
|
||||
ifeq ($(USE_PICOLIBC),1)
|
||||
LIBM_NAME := libc.a
|
||||
else ifeq ($(USE_MUSL),1)
|
||||
LIBM_NAME := libc.a
|
||||
else
|
||||
LIBM_NAME := libm.a
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user