Skip to contentSkip to conversation

micropython: Invert fallback detection logic

PATCH Superseded Chris Packham 2 participants 3 messages Sep 21, 2015

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 micropython: Invert fallback detection logic

Rather than specifying architectures that do not have explicit support in micropython invert the logic and set MICROPY_GCREGS_SETJMP=1 if the architecture does not have explicit support. MIPS is listed as being supported but this support consists of automatically defining MICROPY_GCREGS_SETJMP 1 based on __mips__ being defined.

---
This should clean up most of the remaining build failures. Listing the architectures with explicit support makes more sense to me and is certainly a shorter list at the moment.

 package/micropython/micropython.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/micropython/micropython.mk +1 -1
index f2ad5bf..e351843 100644
@@ -13,7 +13,7 @@ MICROPYTHON_PATCH = https://github.com/micropython/micropython/commit/8b4fb4fe14
 
 # Use fallback implementation for exception handling on architectures that don't
 # have explicit support.
-ifeq ($(BR2_powerpc)$(BR2_sh)$(BR2_xtensa),y)
+ifneq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb),y)
 MICROPYTHON_CFLAGS = -DMICROPY_GCREGS_SETJMP=1
 endif
 
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 micropython: Invert fallback detection logic

Hi Chris,

Quoted 20 lines · Chris Packham

Rather than specifying architectures that do not have explicit support in micropython invert the logic and set MICROPY_GCREGS_SETJMP=1 if the architecture does not have explicit support. MIPS is listed as being supported but this support consists of automatically defining MICROPY_GCREGS_SETJMP 1 based on __mips__ being defined.

---
This should clean up most of the remaining build failures. Listing the architectures with explicit support makes more sense to me and is certainly a shorter list at the moment.

 package/micropython/micropython.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/micropython/micropython.mk +0 -0
index f2ad5bf..e351843 100644

package/micropython/micropython.mk MICROPYTHON_PATCH = https://github.com/micropython/micropython/commit/8b4fb4fe14 · line 16

Quoted 5 lines
package/micropython/micropython.mk +1 -1
@@ -13,7 +13,7 @@ MICROPYTHON_PATCH = https://github.com/micropython/micropython/commit/8b4fb4fe14
 
 # Use fallback implementation for exception handling on architectures that don't
 # have explicit support.
-ifeq ($(BR2_powerpc)$(BR2_sh)$(BR2_xtensa),y)
+ifneq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb),y)

We prefer positive logic, like (untested):

   ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb),)

baruch

Quoted 2 lines
package/micropython/micropython.mk +0 -0
 MICROPYTHON_CFLAGS = -DMICROPY_GCREGS_SETJMP=1
 endif
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

PATCH v2 1/1 micropython: Invert fallback detection logic

Rather than specifying architectures that do not have explicit support in micropython invert the logic and set MICROPY_GCREGS_SETJMP=1 if the architecture does not have explicit support. MIPS is listed as being supported but this support consists of automatically defining MICROPY_GCREGS_SETJMP 1 based on __mips__ being defined.

---
This should clean up most of the remaining build failures. Listing the architectures with explicit support makes more sense to me and is certainly a shorter list at the moment.

Changes since v1:
- Use positive logic ifeq(,) instead of ifneq(,y)

 package/micropython/micropython.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/micropython/micropython.mk +1 -1
index f2ad5bf..f8f1e80 100644
@@ -13,7 +13,7 @@ MICROPYTHON_PATCH = https://github.com/micropython/micropython/commit/8b4fb4fe14
 
 # Use fallback implementation for exception handling on architectures that don't
 # have explicit support.
-ifeq ($(BR2_powerpc)$(BR2_sh)$(BR2_xtensa),y)
+ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb),)
 MICROPYTHON_CFLAGS = -DMICROPY_GCREGS_SETJMP=1
 endif
 
Signature · 1 line
2.5.0