summaryrefslogtreecommitdiff
path: root/py/mkrules.mk
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2017-07-15 17:03:24 -0400
committerScott Shawcroft <scott@tannewt.org>2017-07-16 16:00:41 -0700
commit0d2c1bf2bb130e5ddf7913165e6ae873a723dcf7 (patch)
treed66fc31091ce22075a90d3add7f163c58442a6d9 /py/mkrules.mk
parentaf823e64c4768996e510bab613106018fde22329 (diff)
Fix problems that prevented use of internal frozen modules:
1. Allow -Wlto-type-mismatch to be just a warning when building with frozen modules. 2. Fix extern decls that triggered -Wnested-externs when building with frozen modules. 3. Pass the correct value of -mlongint-impl to $(MPY_TOOL). New file mpconfigport.mk to do this.
Diffstat (limited to 'py/mkrules.mk')
-rw-r--r--py/mkrules.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/py/mkrules.mk b/py/mkrules.mk
index 337c662a4..63640c03a 100644
--- a/py/mkrules.mk
+++ b/py/mkrules.mk
@@ -118,9 +118,11 @@ $(BUILD)/frozen_mpy/%.mpy: $(FROZEN_MPY_DIR)/%.py $(TOP)/mpy-cross/mpy-cross
$(Q)$(MPY_CROSS) -o $@ -s $(<:$(FROZEN_MPY_DIR)/%=%) $(MPY_CROSS_FLAGS) $<
# to build frozen_mpy.c from all .mpy files
+# You need to define MPY_TOOL_LONGINT_IMPL in mpconfigport.mk
+# if the default will not work (mpz is the default).
$(BUILD)/frozen_mpy.c: $(FROZEN_MPY_MPY_FILES) $(BUILD)/genhdr/qstrdefs.generated.h
$(STEPECHO) "Creating $@"
- $(Q)$(PYTHON) $(MPY_TOOL) -f -q $(BUILD)/genhdr/qstrdefs.preprocessed.h $(FROZEN_MPY_MPY_FILES) > $@
+ $(Q)$(PYTHON) $(MPY_TOOL) $(MPY_TOOL_LONGINT_IMPL) -f -q $(BUILD)/genhdr/qstrdefs.preprocessed.h $(FROZEN_MPY_MPY_FILES) > $@
endif
ifneq ($(PROG),)