Enable C++11 for GCC targets

The gnu++11 mode is used for now since some repos (notably uVisor)
depend on the GCC extensions. Once this is fixed, we should have no
problem switching to c++11.
Tested on our release repositores, and after a few changes in a couple
of repos, everything seems to compile fine.
This commit is contained in:
Bogdan Marinescu 2015-11-27 13:25:22 +02:00
parent c3a8a1c338
commit 831875b1e7
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ set(YOTTA_POSTPROCESS_COMMAND "\"${ARM_NONE_EABI_OBJCOPY}\" -O binary YOTTA_CURR
set(_C_FAMILY_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -ffunction-sections -fdata-sections -Wall -Wextra") set(_C_FAMILY_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -ffunction-sections -fdata-sections -Wall -Wextra")
set(CMAKE_C_FLAGS_INIT "-std=c99 ${_C_FAMILY_FLAGS_INIT}") set(CMAKE_C_FLAGS_INIT "-std=c99 ${_C_FAMILY_FLAGS_INIT}")
set(CMAKE_ASM_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -x assembler-with-cpp") set(CMAKE_ASM_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -x assembler-with-cpp")
set(CMAKE_CXX_FLAGS_INIT "${_C_FAMILY_FLAGS_INIT} -fno-rtti -fno-threadsafe-statics") set(CMAKE_CXX_FLAGS_INIT "--std=gnu++11 ${_C_FAMILY_FLAGS_INIT} -fno-rtti -fno-threadsafe-statics")
set(CMAKE_MODULE_LINKER_FLAGS_INIT set(CMAKE_MODULE_LINKER_FLAGS_INIT
"-fno-exceptions -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment" "-fno-exceptions -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment"
) )