From 4b04cfeddcc8c9ea6c41128a904005bd6220b2fb Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Wed, 15 Sep 2021 23:12:59 +0200 Subject: build: Build with -fdata-sections. --- build/scons_tools/tool_selectmcu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build') diff --git a/build/scons_tools/tool_selectmcu.py b/build/scons_tools/tool_selectmcu.py index 89e033b..cc88625 100644 --- a/build/scons_tools/tool_selectmcu.py +++ b/build/scons_tools/tool_selectmcu.py @@ -18,11 +18,11 @@ def SelectMCU(env, mcu, variant_dir = None): CC = '${TOOLCHAIN}gcc', CXX = '${TOOLCHAIN}g++', AS = '${TOOLCHAIN}gcc', - LINK = '${TOOLCHAIN}gcc', + LINK = '${TOOLCHAIN}g++', AR = '${TOOLCHAIN}ar', RANLIB = '${TOOLCHAIN}ranlib', - CCFLAGS = Split('-O2 -Wall -ggdb -ffunction-sections'), + CCFLAGS = Split('-O2 -Wall -ggdb -ffunction-sections -fdata-sections'), CXXFLAGS = Split('-std=c++20 -fno-exceptions -fno-rtti'), ASFLAGS = Split('-c -x assembler-with-cpp'), LINKFLAGS = Split('-Wall -nostartfiles -Wl,-T${LINK_SCRIPT} -Wl,--gc-sections'), -- cgit v1.2.3