diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-16 11:51:32 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-16 11:51:32 +0100 |
commit | 4f7f2e04a35c7f10d1b2b299bac19dff002bb07c (patch) | |
tree | 7af1bf962d704c19a02677e9146e5de63fb24c63 | |
parent | ecdf6cdc5bdbb51451604df0713f1b24476f0714 (diff) | |
parent | 571d5a3363f66b80d8983050168bc06d70357341 (diff) | |
download | micropython-4f7f2e04a35c7f10d1b2b299bac19dff002bb07c.tar.gz micropython-4f7f2e04a35c7f10d1b2b299bac19dff002bb07c.zip |
Merge pull request #497 from lurch/build-32bit
New config option MICROPY_FORCE_32BIT (defaulted to 0)
-rw-r--r-- | unix/Makefile | 10 | ||||
-rw-r--r-- | unix/mpconfigport.mk | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/unix/Makefile b/unix/Makefile index ac1baf3d00..07a75f7adb 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -20,6 +20,16 @@ else LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-Map=$@.map,--cref endif +ifeq ($(MICROPY_FORCE_32BIT),1) +CFLAGS += -m32 +LDFLAGS += -m32 +ifeq ($(MICROPY_MOD_FFI),1) +ifeq ($(UNAME_S),Linux) +CFLAGS_MOD += -I/usr/include/i686-linux-gnu +endif +endif +endif + ifeq ($(MICROPY_USE_READLINE),1) CFLAGS_MOD += -DMICROPY_USE_READLINE=1 LDFLAGS_MOD += -lreadline diff --git a/unix/mpconfigport.mk b/unix/mpconfigport.mk index bfb01a71f1..352d010676 100644 --- a/unix/mpconfigport.mk +++ b/unix/mpconfigport.mk @@ -1,5 +1,8 @@ # Enable/disable modules and 3rd-party libs to be included in interpreter +# Build 32-bit binaries on a 64-bit host +MICROPY_FORCE_32BIT = 0 + # Linking with GNU readline causes binary to be licensed under GPL MICROPY_USE_READLINE = 1 |