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
|
MPY_EXTERN_SYM_FILE=$(MPY_DIR)/ports/esp8266/boards/eagle.rom.addr.v6.ld
|
||||||
endif
|
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
|
include $(MPY_DIR)/py/dynruntime.mk
|
||||||
|
@@ -63,14 +63,14 @@ else ifeq ($(ARCH),armv6m)
|
|||||||
# thumb
|
# thumb
|
||||||
CROSS = arm-none-eabi-
|
CROSS = arm-none-eabi-
|
||||||
CFLAGS_ARCH += -mthumb -mcpu=cortex-m0
|
CFLAGS_ARCH += -mthumb -mcpu=cortex-m0
|
||||||
MICROPY_FLOAT_IMPL ?= none
|
MICROPY_FLOAT_IMPL ?= float
|
||||||
|
|
||||||
else ifeq ($(ARCH),armv7m)
|
else ifeq ($(ARCH),armv7m)
|
||||||
|
|
||||||
# thumb
|
# thumb
|
||||||
CROSS = arm-none-eabi-
|
CROSS = arm-none-eabi-
|
||||||
CFLAGS_ARCH += -mthumb -mcpu=cortex-m3
|
CFLAGS_ARCH += -mthumb -mcpu=cortex-m3
|
||||||
MICROPY_FLOAT_IMPL ?= none
|
MICROPY_FLOAT_IMPL ?= float
|
||||||
|
|
||||||
else ifeq ($(ARCH),armv7emsp)
|
else ifeq ($(ARCH),armv7emsp)
|
||||||
|
|
||||||
|
@@ -561,13 +561,11 @@ function ci_native_mpy_modules_build {
|
|||||||
make -C examples/natmod/$natmod ARCH=$arch
|
make -C examples/natmod/$natmod ARCH=$arch
|
||||||
done
|
done
|
||||||
|
|
||||||
# features2 requires soft-float on armv7m, rv32imc, and xtensa. On armv6m
|
# features2 requires soft-float on rv32imc and xtensa.
|
||||||
# the compiler generates absolute relocations in the object file
|
|
||||||
# referencing soft-float functions, which is not supported at the moment.
|
|
||||||
make -C examples/natmod/features2 ARCH=$arch clean
|
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
|
make -C examples/natmod/features2 ARCH=$arch MICROPY_FLOAT_IMPL=float
|
||||||
elif [ $arch != "armv6m" ]; then
|
else
|
||||||
make -C examples/natmod/features2 ARCH=$arch
|
make -C examples/natmod/features2 ARCH=$arch
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user