From 18c22faf4d643098731fc2e448b212dfbd5ea612 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 29 Aug 2015 21:13:07 +0300 Subject: py: Treat -m32 flag as part of CC, LD, etc. Indeed, this flag efectively selects architecture target, and must consistently apply to all compiles and links, including 3rd-party libraries, unlike CFLAGS, which have MicroPython-specific setting. --- py/mkenv.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'py') 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 -- cgit v1.2.3