1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

make: add -ffunction-sections -fdata-sections to LINKFLAGS if LTO=1

This commit is contained in:
Kaspar Schleiser 2021-08-31 12:55:09 +02:00
parent 726c461cb5
commit 1547d2f075

View File

@ -54,7 +54,7 @@ endif
ifeq ($(LTO),1)
$(warning Building with Link-Time-Optimizations is currently an experimental feature. Expect broken binaries.)
LTOFLAGS = -flto
LINKFLAGS += $(LTOFLAGS)
LINKFLAGS += $(LTOFLAGS) -ffunction-sections -fdata-sections
endif
# Forbid common symbols to prevent accidental aliasing.