aboutsummaryrefslogtreecommitdiff
path: root/py/py.mk
diff options
context:
space:
mode:
authorJim Mussared2019-10-23 11:56:37 +1100
committerDamien George2020-01-12 10:34:10 +1100
commit7d2ccd027fce61642a3a1177220d7f9c69f371f9 (patch)
tree20c56fbddb44efe79697d92c709b91186efbc66c /py/py.mk
parentbfbd94401d9cf658fc50b2e45896aba300a7af71 (diff)
py/mkenv.mk: Move usage of 32-bit flags to py.mk.
This allows ports/variants to configure MICROPY_FORCE_32BIT after including mkenv.mk, but before py.mk.
Diffstat (limited to 'py/py.mk')
-rw-r--r--py/py.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/py/py.mk b/py/py.mk
index 8c2d3c7b8..09de1962d 100644
--- a/py/py.mk
+++ b/py/py.mk
@@ -21,6 +21,13 @@ QSTR_GLOBAL_REQUIREMENTS += $(HEADER_BUILD)/mpversion.h
# some code is performance bottleneck and compiled with other optimization options
CSUPEROPT = -O3
+# Enable building 32-bit code on 64-bit host.
+ifeq ($(MICROPY_FORCE_32BIT),1)
+CC += -m32
+CXX += -m32
+LD += -m32
+endif
+
# External modules written in C.
ifneq ($(USER_C_MODULES),)
# pre-define USERMOD variables as expanded so that variables are immediate