Merge branch 'master' of https://github.com/sudar/Arduino-Makefile
This commit is contained in:
commit
73426bc233
3 changed files with 16 additions and 11 deletions
|
@ -1045,7 +1045,7 @@ endif
|
|||
|
||||
ifndef CFLAGS_STD
|
||||
ifeq ($(shell expr $(CC_VERNUM) '>' 490), 1)
|
||||
CFLAGS_STD = -std=gnu11 -flto -fno-fat-lto-objects -fdiagnostics-color
|
||||
CFLAGS_STD = -std=gnu11
|
||||
else
|
||||
CFLAGS_STD =
|
||||
endif
|
||||
|
@ -1056,7 +1056,7 @@ endif
|
|||
|
||||
ifndef CXXFLAGS_STD
|
||||
ifeq ($(shell expr $(CC_VERNUM) '>' 490), 1)
|
||||
CXXFLAGS_STD = -std=gnu++11 -fno-threadsafe-statics -flto -fno-devirtualize -fdiagnostics-color
|
||||
CXXFLAGS_STD = -std=gnu++11
|
||||
else
|
||||
CXXFLAGS_STD =
|
||||
endif
|
||||
|
@ -1069,7 +1069,9 @@ CFLAGS += $(CFLAGS_STD)
|
|||
CXXFLAGS += -fpermissive -fno-exceptions $(CXXFLAGS_STD)
|
||||
ASFLAGS += -x assembler-with-cpp
|
||||
ifeq ($(shell expr $(CC_VERNUM) '>' 490), 1)
|
||||
ASFLAGS += -flto
|
||||
ASFLAGS += -flto
|
||||
CXXFLAGS += -fno-threadsafe-statics -flto -fno-devirtualize -fdiagnostics-color
|
||||
CFLAGS += -flto -fno-fat-lto-objects -fdiagnostics-color
|
||||
endif
|
||||
LDFLAGS += -$(MCU_FLAG_NAME)=$(MCU) -Wl,--gc-sections -O$(OPTIMIZATION_LEVEL)
|
||||
ifeq ($(shell expr $(CC_VERNUM) '>' 490), 1)
|
||||
|
|
|
@ -8,6 +8,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
|
|||
- Fix: Add -fno-devirtualize flag to workaround g++ segfault bug (issue #486). (https://github.com/sej7278)
|
||||
- Fix: Quote the prefix tag in the space_pad_to function
|
||||
- Tweak: Set ARDMK_VERSION to 1.6 (https://github.com/sej7278)
|
||||
- Tweak: Move non-standard-related items from CxxFLAGS_STD to CxxFLAGS (issue #523) (https://github.com/sej7278)
|
||||
- New: Added -fdiagnostics-color to *STD flags (https://github.com/sej7278)
|
||||
- New: Add generation of tags file using ctags, which automatically includes project libs and Arduino core. (https://github.com/tuna-f1sh)
|
||||
|
||||
|
|
|
@ -913,7 +913,7 @@ OTHER_LIBS = -lsomeplatformlib
|
|||
|
||||
Controls, *exclusively*, which C standard is to be used for compilation.
|
||||
|
||||
Defaults to `undefined` on 1.0.x or `-std=gnu11 -flto -fno-fat-lto-objects` on 1.5+ or if you install AVR toolchain > 4.9.0
|
||||
Defaults to `undefined` on 1.0.x or `-std=gnu11` on 1.5+ or if you install AVR toolchain > 4.9.0
|
||||
|
||||
Possible values:
|
||||
|
||||
|
@ -928,14 +928,14 @@ Possible values:
|
|||
* `-std=c11`
|
||||
* `-std=gnu89`
|
||||
* `-std=gnu99`
|
||||
* `-std=gnu11 -flto -fno-fat-lto-objects` - This is the default for C code
|
||||
* `-std=gnu11` - This is the default for C code
|
||||
|
||||
For more information, please refer to the [Options Controlling C Dialect](https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html)
|
||||
|
||||
**Example:**
|
||||
|
||||
```Makefile
|
||||
CFLAGS_STD = = -std=gnu89
|
||||
CFLAGS_STD = -std=gnu89
|
||||
```
|
||||
|
||||
**Requirement:** *Optional*
|
||||
|
@ -948,7 +948,7 @@ CFLAGS_STD = = -std=gnu89
|
|||
|
||||
Controls, *exclusively*, which C++ standard is to be used for compilation.
|
||||
|
||||
Defaults to `undefined` on 1.0 or `-std=gnu++11 -fno-threadsafe-statics -flto` on AVR toolchain > 4.9.0 (e.g. IDE 1.6.10+)
|
||||
Defaults to `undefined` on 1.0 or `-std=gnu++11` on AVR toolchain > 4.9.0 (e.g. IDE 1.6.10+)
|
||||
|
||||
Possible values:
|
||||
|
||||
|
@ -965,7 +965,7 @@ Possible values:
|
|||
* `-std=c++1y`
|
||||
* `-std=c++14`
|
||||
* `-std=gnu++98`
|
||||
* `-std=gnu++11 -fno-threadsafe-statics -flto` - This is the default for C++ code
|
||||
* `-std=gnu++11` - This is the default for C++ code
|
||||
* `-std=gnu++1y`
|
||||
* `-std=gnu++14`
|
||||
|
||||
|
@ -974,7 +974,7 @@ For more information, please refer to the [Options Controlling C Dialect](https:
|
|||
**Example:**
|
||||
|
||||
```Makefile
|
||||
CXXFLAGS_STD = = -std=gnu++98
|
||||
CXXFLAGS_STD = -std=gnu++98
|
||||
```
|
||||
|
||||
**Requirement:** *Optional*
|
||||
|
@ -988,7 +988,7 @@ CXXFLAGS_STD = = -std=gnu++98
|
|||
Flags passed to compiler for files compiled as C. Add more flags to this
|
||||
variable using `+=`.
|
||||
|
||||
Defaults to all flags required for a typical build.
|
||||
Defaults to `undefined` on 1.0 or `-flto -fno-fat-lto-objects -fdiagnostics-color` on AVR toolchain > 4.9.0 (e.g. IDE 1.6.10+)
|
||||
|
||||
**Example:**
|
||||
|
||||
|
@ -1007,7 +1007,9 @@ CFLAGS += -my-c-only-flag
|
|||
Flags passed to the compiler for files compiled as C++. Add more flags to this
|
||||
variable using `+=`.
|
||||
|
||||
Defaults to `-fpermissive -fno-exceptions`
|
||||
Defaults to `-fpermissive -fno-exceptions` on 1.0
|
||||
or `-fpermissive -fno-exceptions -fno-threadsafe-statics -flto -fno-devirtualize -fdiagnostics-color`
|
||||
on AVR toolchain > 4.9.0 (e.g. IDE 1.6.10+)
|
||||
|
||||
**Example:**
|
||||
|
||||
|
|
Loading…
Reference in a new issue