Merge pull request #546 from kierdavis/disable-prog-types-compat

Allow compatibility with old pgmspace API to be disabled by the user
This commit is contained in:
Simon John 2018-02-24 16:06:09 +00:00 committed by GitHub
commit a7b8084ac6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -1047,11 +1047,17 @@ else
endif
# Using += instead of =, so that CPPFLAGS can be set per sketch level
CPPFLAGS += -$(MCU_FLAG_NAME)=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO_VERSION) $(ARDUINO_ARCH_FLAG) -D__PROG_TYPES_COMPAT__ \
CPPFLAGS += -$(MCU_FLAG_NAME)=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO_VERSION) $(ARDUINO_ARCH_FLAG) \
-I$(ARDUINO_CORE_PATH) -I$(ARDUINO_VAR_PATH)/$(VARIANT) \
$(SYS_INCLUDES) $(PLATFORM_INCLUDES) $(USER_INCLUDES) -Wall -ffunction-sections \
-fdata-sections
# PROG_TYPES_COMPAT is enabled by default for compatibility with the Arduino IDE.
# By placing it before the user-provided CPPFLAGS rather than after, we allow the
# the user to disable it if they like, by adding the negation of the flag
# (-U__PROG_TYPES_COMPAT__) to the user-provided CPPFLAGS.
CPPFLAGS := -D__PROG_TYPES_COMPAT__ $(CPPFLAGS)
ifdef DEBUG
OPTIMIZATION_FLAGS= $(DEBUG_FLAGS)
else

View file

@ -18,6 +18,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
- New: Add generation of tags file using ctags, which automatically includes project libs and Arduino core. (https://github.com/tuna-f1sh)
- New: Add template Makefile and project boilerplate initialise script, `ardmk-init`. (https://github.com/tuna-f1sh)
- New: Support atmelice_isp JTAG tool as ISP programmer. (https://github.com/tuna-f1sh)
- New: Compatibility with deprecated pgmspace.h API can now be disabled since it sometimes causes bogus compiler warnings (issue #546)
- New: Support Arduino ARM-based (SAM/SAMD) devices. (https://github.com/tuna-f1sh)
### 1.6.0 (2017-07-11)