Files
micropython/examples/natmod/re/Makefile
Alessandro Gatti e939d3ec76 tools/mpy_ld.py: Add RV64 natmod support.
This commit adds the ability to compile native modules for the RV64
platform, using "rv64imc" as its architecture name (eg.
"make ARCH=rv64imc" should build a RV64 natmod).

The rest of 64-bits relocations needed to build a native module are now
implemented, and all sample native modules build without errors or
warnings.  The same Picolibc caveats on RV32 also apply on RV64, thus
the documentation was updated accordingly.

RV64 native modules are also built as part of the CI process, but not
yet executed as the QEMU port is not yet able to load and run them.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2025-12-30 18:18:42 +01:00

19 lines
414 B
Makefile

# Location of top-level MicroPython directory
MPY_DIR = ../../..
# Name of module (different to built-in re so it can coexist)
MOD = re_$(ARCH)
# Source files (.c or .py)
SRC = re.c
# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc, rv64imc)
ARCH = x64
ifeq ($(ARCH),armv6m)
# Link with libgcc.a for division helper functions
LINK_RUNTIME = 1
endif
include $(MPY_DIR)/py/dynruntime.mk