summaryrefslogtreecommitdiff
path: root/build/scons_tools
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2021-09-15 23:12:59 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2021-09-15 23:12:59 +0200
commit4b04cfeddcc8c9ea6c41128a904005bd6220b2fb (patch)
tree62c4e446dd1b250341ddd0d20cdc477f7af38b41 /build/scons_tools
parent71998c039fd18d2ef7da974232d1cb5d986b4a97 (diff)
build: Build with -fdata-sections.
Diffstat (limited to 'build/scons_tools')
-rw-r--r--build/scons_tools/tool_selectmcu.py4
1 files changed, 2 insertions, 2 deletions
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'),