diff options
| author | Dan Halbert <halbert@halwitz.org> | 2017-07-15 17:03:24 -0400 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2017-07-16 16:00:41 -0700 |
| commit | 0d2c1bf2bb130e5ddf7913165e6ae873a723dcf7 (patch) | |
| tree | d66fc31091ce22075a90d3add7f163c58442a6d9 /atmel-samd | |
| parent | af823e64c4768996e510bab613106018fde22329 (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 'atmel-samd')
| -rw-r--r-- | atmel-samd/Makefile | 2 | ||||
| -rw-r--r-- | atmel-samd/mpconfigport.h | 1 | ||||
| -rw-r--r-- | atmel-samd/mpconfigport.mk | 4 |
3 files changed, 7 insertions, 0 deletions
diff --git a/atmel-samd/Makefile b/atmel-samd/Makefile index 485f19141..cc3e0b399 100644 --- a/atmel-samd/Makefile +++ b/atmel-samd/Makefile @@ -140,6 +140,7 @@ ifneq ($(FROZEN_DIR),) # To use frozen source modules, put your .py files in a subdirectory (eg scripts/) # and then invoke make with FROZEN_DIR=scripts (be sure to build from scratch). CFLAGS += -DMICROPY_MODULE_FROZEN_STR +CFLAGS += -Wno-error=lto-type-mismatch endif ifneq ($(FROZEN_MPY_DIR),) @@ -147,6 +148,7 @@ ifneq ($(FROZEN_MPY_DIR),) # then invoke make with FROZEN_MPY_DIR=frozen (be sure to build from scratch). CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool CFLAGS += -DMICROPY_MODULE_FROZEN_MPY +CFLAGS += -Wno-error=lto-type-mismatch endif #LIBM_FILE_NAME = $(shell $(CC) $(CFLAGS) -print-file-name=libm.a) diff --git a/atmel-samd/mpconfigport.h b/atmel-samd/mpconfigport.h index 3087730fc..dd62a9f05 100644 --- a/atmel-samd/mpconfigport.h +++ b/atmel-samd/mpconfigport.h @@ -62,6 +62,7 @@ #define MICROPY_PY_STRUCT (1) #define MICROPY_PY_SYS (1) #define MICROPY_CPYTHON_COMPAT (0) +// If you change MICROPY_LONGINT_IMPL, also change MPY_TOOL_LONGINT_IMPL in mpconfigport.mk. #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE) #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT) #define MICROPY_STREAMS_NON_BLOCK (1) diff --git a/atmel-samd/mpconfigport.mk b/atmel-samd/mpconfigport.mk new file mode 100644 index 000000000..208064b6c --- /dev/null +++ b/atmel-samd/mpconfigport.mk @@ -0,0 +1,4 @@ +# 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. +MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none |
