mirror of
https://github.com/micropython/micropython.git
synced 2025-07-21 21:11:12 +02:00
py/dynruntime.mk: Enable single-precision float by default on armv6/7m.
Soft float now works on these ARM targets thanks to the parent commit. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -14,4 +14,9 @@ ifeq ($(ARCH),xtensa)
|
||||
MPY_EXTERN_SYM_FILE=$(MPY_DIR)/ports/esp8266/boards/eagle.rom.addr.v6.ld
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH),$(filter $(ARCH),armv6m armv7m))
|
||||
# Link with libm.a for soft-float helper functions
|
||||
LINK_RUNTIME = 1
|
||||
endif
|
||||
|
||||
include $(MPY_DIR)/py/dynruntime.mk
|
||||
|
@@ -63,14 +63,14 @@ else ifeq ($(ARCH),armv6m)
|
||||
# thumb
|
||||
CROSS = arm-none-eabi-
|
||||
CFLAGS_ARCH += -mthumb -mcpu=cortex-m0
|
||||
MICROPY_FLOAT_IMPL ?= none
|
||||
MICROPY_FLOAT_IMPL ?= float
|
||||
|
||||
else ifeq ($(ARCH),armv7m)
|
||||
|
||||
# thumb
|
||||
CROSS = arm-none-eabi-
|
||||
CFLAGS_ARCH += -mthumb -mcpu=cortex-m3
|
||||
MICROPY_FLOAT_IMPL ?= none
|
||||
MICROPY_FLOAT_IMPL ?= float
|
||||
|
||||
else ifeq ($(ARCH),armv7emsp)
|
||||
|
||||
|
@@ -561,13 +561,11 @@ function ci_native_mpy_modules_build {
|
||||
make -C examples/natmod/$natmod ARCH=$arch
|
||||
done
|
||||
|
||||
# features2 requires soft-float on armv7m, rv32imc, and xtensa. On armv6m
|
||||
# the compiler generates absolute relocations in the object file
|
||||
# referencing soft-float functions, which is not supported at the moment.
|
||||
# features2 requires soft-float on rv32imc and xtensa.
|
||||
make -C examples/natmod/features2 ARCH=$arch clean
|
||||
if [ $arch = "rv32imc" ] || [ $arch = "armv7m" ] || [ $arch = "xtensa" ]; then
|
||||
if [ $arch = "rv32imc" ] || [ $arch = "xtensa" ]; then
|
||||
make -C examples/natmod/features2 ARCH=$arch MICROPY_FLOAT_IMPL=float
|
||||
elif [ $arch != "armv6m" ]; then
|
||||
else
|
||||
make -C examples/natmod/features2 ARCH=$arch
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user