From 9d00d5c8d11a1fb5250e1b26d7c223d90c88a061 Mon Sep 17 00:00:00 2001 From: uvos Date: Thu, 10 Mar 2022 22:22:03 +0100 Subject: [PATCH] add -fno-threadsafe-statics to avoid sdl depp --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fb20032..517218d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,8 +29,8 @@ set(CMAKE_LINKER /usr/bin/avr-ld) # Compiler flags add_definitions(-mmcu=${MCU} -DF_CPU=${CPU_SPEED}) -add_definitions(-s -c -g -O2 -Wall -std=c++17 ) -add_definitions(-fno-exceptions -ffunction-sections -fdata-sections) +add_definitions(-s -c -g -Os -Wall -std=c++17 -flto) +add_definitions(-fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics) # Linker flags set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Os") # remove -rdynamic for C