aboutsummaryrefslogtreecommitdiff
path: root/arduino-mk-vars.md
diff options
context:
space:
mode:
authorladislas <ladislas@weareleka.com>2014-08-13 11:16:16 +0200
committerladislas <ladislas@weareleka.com>2014-08-13 17:52:32 +0200
commit51e65b0a081411c57cce77c043f88ea266713417 (patch)
treee5a1b3be9e502995c8173e5bbe6e8b891db7c89d /arduino-mk-vars.md
parent9bef267f62f7399e2bb1114cb1ac4f206e1ead89 (diff)
add CFLAGS_STD and CXXFLAGS_STD defaults
Diffstat (limited to 'arduino-mk-vars.md')
-rw-r--r--arduino-mk-vars.md62
1 files changed, 59 insertions, 3 deletions
diff --git a/arduino-mk-vars.md b/arduino-mk-vars.md
index 28ed27f..c3a630b 100644
--- a/arduino-mk-vars.md
+++ b/arduino-mk-vars.md
@@ -784,14 +784,70 @@ OPTIMIZATION_LEVEL = 3
**Description:**
-Flags to pass to the C compiler.
+Controls, *exclusively*, which C standard is to be used for compilation.
-Defaults to `-std=gnu99`
+Defaults to `undefined`
+
+Possible values:
+
+* With `avr-gcc 4.3`, shipped with the Arduino IDE:
+ * `undefined`
+ * `-std=c99`
+ * `-std=gnu89` - This is the default for C code
+ * `-std=gnu99`
+* With `avr-gcc 4.7, 4.8 or 4.9`, installed by you
+ * `undefined`
+ * `-std=c99`
+ * `-std=c11`
+ * `-std=gnu89` - This is the default for C code
+ * `-std=gnu99`
+ * `-std=gnu11`
+
+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
+```
+
+**Requirement:** *Optional*
+
+----
+
+### CXXFLAGS_STD
+
+**Description:**
+
+Controls, *exclusively*, which C++ standard is to be used for compilation.
+
+Defaults to `undefined`
+
+Possible values:
+
+* With `avr-gcc 4.3`, shipped with the Arduino IDE:
+ * `undefined`
+ * `-std=c++98`
+ * `-std=c++0x`
+ * `-std=gnu++98` - This is the default for C code
+ * `-std=gnu++0x`
+* With `avr-gcc 4.7, 4.8 or 4.9`, installed by you
+ * `undefined`
+ * `-std=c++98`
+ * `-std=c++11`
+ * `-std=c++1y`
+ * `-std=c++14`
+ * `-std=gnu++98` - This is the default for C++ code
+ * `-std=gnu++11`
+ * `-std=gnu++1y`
+ * `-std=gnu++14`
+
+For more information, please refer to the [Options Controlling C Dialect](https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html)
**Example:**
```Makefile
-<unset as per chipKIT.mk>
+CXXFLAGS_STD = = -std=gnu++98
```
**Requirement:** *Optional*