package/micropython: define MICROPY_NLR_SETJMP for xtensa
authorChris Packham <judge.packham@gmail.com>
Mon, 29 Mar 2021 07:28:28 +0000 (20:28 +1300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 4 Apr 2021 13:38:15 +0000 (15:38 +0200)
As suggested on https://github.com/micropython/micropython/issues/6551
define MICROPY_NLR_SETJMP to avoid the xtensa specific implementation
of nlr_push.

Fixes:
- http://autobuild.buildroot.net/results/5fc8669b5c768ccfc02bd20d1159bce7fe43683e

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/micropython/micropython.mk

index 80d086f3c85a3c45d9a9a5a92058d753750ace88..fa28da9be3c20841cd27cc89c2b6c06ff3705270 100644 (file)
@@ -21,6 +21,11 @@ ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb),)
 MICROPYTHON_CFLAGS = -DMICROPY_GCREGS_SETJMP=1
 endif
 
+# xtensa has problems with nlr_push, use setjmp based implementation instead
+ifeq ($(BR2_xtensa),y)
+MICROPYTHON_CFLAGS = -DMICROPY_NLR_SETJMP=1
+endif
+
 # When building from a tarball we don't have some of the dependencies that are in
 # the git repository as submodules
 MICROPYTHON_MAKE_OPTS += \