From 7d2ccd027fce61642a3a1177220d7f9c69f371f9 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Wed, 23 Oct 2019 11:56:37 +1100 Subject: [PATCH] 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. --- py/mkenv.mk | 5 ----- py/py.mk | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/py/mkenv.mk b/py/mkenv.mk index 3efeb18164..371d320462 100644 --- a/py/mkenv.mk +++ b/py/mkenv.mk @@ -55,11 +55,6 @@ OBJCOPY = $(CROSS_COMPILE)objcopy SIZE = $(CROSS_COMPILE)size STRIP = $(CROSS_COMPILE)strip AR = $(CROSS_COMPILE)ar -ifeq ($(MICROPY_FORCE_32BIT),1) -CC += -m32 -CXX += -m32 -LD += -m32 -endif MAKE_MANIFEST = $(PYTHON) $(TOP)/tools/makemanifest.py MAKE_FROZEN = $(PYTHON) $(TOP)/tools/make-frozen.py diff --git a/py/py.mk b/py/py.mk index 8c2d3c7b80..09de1962d3 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