From 4683619bb0a5524ff9ed98b6e7ed4ff92416645a Mon Sep 17 00:00:00 2001 From: RetiredWizard Date: Thu, 23 Dec 2021 14:29:25 -0500 Subject: [PATCH] Add long integer flags to enable Code stolen from raspberrypi port --- ports/broadcom/mpconfigport.mk | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ports/broadcom/mpconfigport.mk b/ports/broadcom/mpconfigport.mk index f29f48d545..c7b8a2fcc3 100644 --- a/ports/broadcom/mpconfigport.mk +++ b/ports/broadcom/mpconfigport.mk @@ -1,3 +1,22 @@ +# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk +# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. +# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. + +ifeq ($(LONGINT_IMPL),NONE) +MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none +endif + +ifeq ($(LONGINT_IMPL),MPZ) +MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz +endif + +ifeq ($(LONGINT_IMPL),LONGLONG) +MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong +endif + +# All broadcom ports have longints. +LONGINT_IMPL = MPZ + # Typically the first module to create CIRCUITPY_MICROCONTROLLER = 1 # Typically the second module to create