compile with -fno-threadsafe-statics and -fno-rtti to reduce footprint

This commit is contained in:
James Crosby 2015-06-26 14:20:46 +01:00
parent 41b02ceaa9
commit 52cc8a46e8
1 changed files with 2 additions and 2 deletions

View File

@ -30,10 +30,10 @@ set(YOTTA_POSTPROCESS_COMMAND "arm-none-eabi-objcopy -O binary YOTTA_CURRENT_EXE
# set default compilation flags
set(_C_FAMILY_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -ffunction-sections -fdata-sections -Wall -Wextra")
set(_C_FAMILY_FLAGS_INIT "-fno-threadsafe-statics -fno-exceptions -fno-unwind-tables -ffunction-sections -fdata-sections -Wall -Wextra")
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_CXX_FLAGS_INIT "${_C_FAMILY_FLAGS_INIT}")
set(CMAKE_CXX_FLAGS_INIT "${_C_FAMILY_FLAGS_INIT} -fno-rtti")
set(CMAKE_MODULE_LINKER_FLAGS_INIT
"-fno-exceptions -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment"
)