diff options
| -rw-r--r-- | examples/natmod/btree/Makefile | 5 | ||||
| -rw-r--r-- | examples/natmod/deflate/Makefile | 5 | ||||
| -rw-r--r-- | examples/natmod/framebuf/Makefile | 5 | ||||
| -rw-r--r-- | examples/natmod/re/Makefile | 5 |
4 files changed, 20 insertions, 0 deletions
diff --git a/examples/natmod/btree/Makefile b/examples/natmod/btree/Makefile index bcaa7a93d..1910c67c1 100644 --- a/examples/natmod/btree/Makefile +++ b/examples/natmod/btree/Makefile @@ -39,6 +39,11 @@ endif # Use our own errno implementation if Picolibc is used CFLAGS += -D__PICOLIBC_ERRNO_FUNCTION=__errno +ifeq ($(ARCH),armv6m) +# Link with libgcc.a for division helper functions +LINK_RUNTIME = 1 +endif + include $(MPY_DIR)/py/dynruntime.mk # btree needs gnu99 defined diff --git a/examples/natmod/deflate/Makefile b/examples/natmod/deflate/Makefile index 1f63de20d..5823aa4d4 100644 --- a/examples/natmod/deflate/Makefile +++ b/examples/natmod/deflate/Makefile @@ -10,6 +10,11 @@ SRC = deflate.c # Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc) ARCH ?= x64 +ifeq ($(ARCH),armv6m) +# Link with libgcc.a for division helper functions +LINK_RUNTIME = 1 +endif + ifeq ($(ARCH),xtensa) # Link with libm.a and libgcc.a from the toolchain LINK_RUNTIME = 1 diff --git a/examples/natmod/framebuf/Makefile b/examples/natmod/framebuf/Makefile index cb821736e..35453c0bb 100644 --- a/examples/natmod/framebuf/Makefile +++ b/examples/natmod/framebuf/Makefile @@ -10,6 +10,11 @@ SRC = framebuf.c # Architecture to build for (x86, x64, armv7m, xtensa, xtensawin) ARCH ?= x64 +ifeq ($(ARCH),armv6m) +# Link with libgcc.a for division helper functions +LINK_RUNTIME = 1 +endif + ifeq ($(ARCH),xtensa) MPY_EXTERN_SYM_FILE=$(MPY_DIR)/ports/esp8266/boards/eagle.rom.addr.v6.ld endif diff --git a/examples/natmod/re/Makefile b/examples/natmod/re/Makefile index 56b08b988..6535693dc 100644 --- a/examples/natmod/re/Makefile +++ b/examples/natmod/re/Makefile @@ -10,4 +10,9 @@ SRC = re.c # Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc) ARCH = x64 +ifeq ($(ARCH),armv6m) +# Link with libgcc.a for division helper functions +LINK_RUNTIME = 1 +endif + include $(MPY_DIR)/py/dynruntime.mk |
