Skip to content

Commit 0b9ba23

Browse files
committed
Updated docs regarding CXXFLAGS etc. for LTO support
1 parent ab261dd commit 0b9ba23

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

arduino-mk-vars.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ OBJDUMP_NAME = pic32-objdump
822822

823823
Archive utility.
824824

825-
Defaults to `avr-ar`
825+
Defaults to `avr-ar` unless you're using toolchain > 4.8.0 in which case we use avr-gcc-ar.
826826

827827
**Example:**
828828

@@ -894,22 +894,22 @@ OPTIMIZATION_LEVEL = 3
894894

895895
Controls, *exclusively*, which C standard is to be used for compilation.
896896

897-
Defaults to `undefined`
897+
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.8.0
898898

899899
Possible values:
900900

901-
* With `avr-gcc 4.3`, shipped with the Arduino IDE:
901+
* With `avr-gcc 4.3`, shipped with the 1.0 Arduino IDE:
902902
* `undefined`
903903
* `-std=c99`
904904
* `-std=gnu89` - This is the default for C code
905905
* `-std=gnu99`
906-
* With `avr-gcc 4.7, 4.8 or 4.9`, installed by you
906+
* With `avr-gcc 4.7, 4.8 or 4.9`, installed by you or 1.5+ IDE:
907907
* `undefined`
908908
* `-std=c99`
909909
* `-std=c11`
910-
* `-std=gnu89` - This is the default for C code
910+
* `-std=gnu89`
911911
* `-std=gnu99`
912-
* `-std=gnu11`
912+
* `-std=gnu11 -flto -fno-fat-lto-objects` - This is the default for C code
913913

914914
For more information, please refer to the [Options Controlling C Dialect](https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html)
915915

@@ -929,24 +929,24 @@ CFLAGS_STD = = -std=gnu89
929929

930930
Controls, *exclusively*, which C++ standard is to be used for compilation.
931931

932-
Defaults to `undefined` on 1.0 or `-std=gnu++11 -fno-threadsafe-statics` on 1.5+
932+
Defaults to `undefined` on 1.0 or `-std=gnu++11 -fno-threadsafe-statics -flto` on AVR toolchain > 4.8.0 (e.g. IDE 1.5+)
933933

934934
Possible values:
935935

936-
* With `avr-gcc 4.3`, shipped with the Arduino IDE:
936+
* With `avr-gcc 4.3`, shipped with the 1.0 Arduino IDE:
937937
* `undefined`
938938
* `-std=c++98`
939939
* `-std=c++0x`
940940
* `-std=gnu++98` - This is the default for C code
941941
* `-std=gnu++0x`
942-
* With `avr-gcc 4.7, 4.8 or 4.9`, installed by you
942+
* With `avr-gcc 4.7, 4.8 or 4.9`, installed by you or 1.5+ IDE:
943943
* `undefined`
944944
* `-std=c++98`
945945
* `-std=c++11`
946946
* `-std=c++1y`
947947
* `-std=c++14`
948-
* `-std=gnu++98` - This is the default for C++ code
949-
* `-std=gnu++11`
948+
* `-std=gnu++98`
949+
* `-std=gnu++11 -fno-threadsafe-statics -flto` - This is the default for C++ code
950950
* `-std=gnu++1y`
951951
* `-std=gnu++14`
952952

@@ -988,7 +988,7 @@ CFLAGS += -my-c-only-flag
988988
Flags passed to the compiler for files compiled as C++. Add more flags to this
989989
variable using `+=`.
990990

991-
Defaults to all flags required for a typical build.
991+
Defaults to `-fpermissive -fno-exceptions`
992992

993993
**Example:**
994994

0 commit comments

Comments
 (0)