Skip to content

Commit 9c11950

Browse files
committed
feat: default language standards set to gnu C/C++17
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 794945c commit 9c11950

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

platform.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ compiler.extra_flags=-mcpu={build.mcu} {build.fpu} {build.float-abi} -DUSE_FULL_
3232

3333
compiler.S.flags={compiler.extra_flags} -c -x assembler-with-cpp {compiler.stm.extra_include}
3434

35-
compiler.c.flags={compiler.extra_flags} -c {build.flags.optimize} {build.flags.debug} {compiler.warning_flags} -std=gnu11 -ffunction-sections -fdata-sections --param max-inline-insns-single=500 -MMD {compiler.stm.extra_include}
35+
compiler.c.flags={compiler.extra_flags} -c {build.flags.optimize} {build.flags.debug} {compiler.warning_flags} -std={compiler.c.std} -ffunction-sections -fdata-sections --param max-inline-insns-single=500 -MMD {compiler.stm.extra_include}
3636

3737
compiler.cpp.flags={compiler.extra_flags} -c {build.flags.optimize} {build.flags.debug} {compiler.warning_flags} -std={compiler.cpp.std} -ffunction-sections -fdata-sections -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -fno-use-cxa-atexit -MMD {compiler.stm.extra_include}
3838

@@ -59,9 +59,10 @@ build.variant_h=variant_generic.h
5959
# These can be overridden in platform.local.txt
6060
compiler.c.st_extra_flags={build.peripheral_pins}
6161
compiler.c.extra_flags=
62+
compiler.c.std=gnu17
6263
compiler.c.elf.extra_flags=
6364
compiler.cpp.extra_flags=
64-
compiler.cpp.std=gnu++14
65+
compiler.cpp.std=gnu++17
6566
compiler.S.st_extra_flags={build.startup_file}
6667
compiler.S.extra_flags=
6768
compiler.ar.extra_flags=

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy