[build/android] Prevent code relocations in MicroPython

This commit is contained in:
Léa Saviot
2020-07-09 17:38:01 +02:00
committed by Ecco
parent 1fde815769
commit 2af89fb546

View File

@@ -34,6 +34,10 @@ CXX = $(NDK_TOOLCHAIN_PATH)/$(NDK_TARGET)$(NDK_VERSION)-clang++
LD = $(NDK_TOOLCHAIN_PATH)/$(NDK_TARGET)$(NDK_VERSION)-clang++
SFLAGS += -fPIC
# If MICROPY_NLR_SETJMP is 0, the MicroPython NLR is done by
# python/src/py/nlrthumb.c and creates code containing relocations, which is not
# accepted by Android.
SFLAGS += -DMICROPY_NLR_SETJMP=1
LDFLAGS += -shared
LDFLAGS += -static-libstdc++