aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--py/mkenv.mk6
-rw-r--r--unix/Makefile2
2 files changed, 6 insertions, 2 deletions
diff --git a/py/mkenv.mk b/py/mkenv.mk
index 4bc71edd7..5540a070f 100644
--- a/py/mkenv.mk
+++ b/py/mkenv.mk
@@ -46,10 +46,16 @@ PYTHON = python
AS = $(CROSS_COMPILE)as
CC = $(CROSS_COMPILE)gcc
+CXX = $(CROSS_COMPILE)g++
LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy
SIZE = $(CROSS_COMPILE)size
STRIP = $(CROSS_COMPILE)strip
+ifeq ($(MICROPY_FORCE_32BIT),1)
+CC += -m32
+CXX += -m32
+LD += -m32
+endif
all:
.PHONY: all
diff --git a/unix/Makefile b/unix/Makefile
index 5db26a9ac..a06117083 100644
--- a/unix/Makefile
+++ b/unix/Makefile
@@ -47,8 +47,6 @@ LDFLAGS = $(LDFLAGS_MOD) $(LDFLAGS_ARCH) -lm $(LDFLAGS_EXTRA)
ifeq ($(MICROPY_FORCE_32BIT),1)
# Note: you may need to install i386 versions of dependency packages,
# starting with linux-libc-dev:i386
-CFLAGS += -m32
-LDFLAGS += -m32
ifeq ($(MICROPY_PY_FFI),1)
ifeq ($(UNAME_S),Linux)
CFLAGS_MOD += -I/usr/include/i686-linux-gnu