From 53eedc9d08dff8200808cdbfa55f87dcb0f16786 Mon Sep 17 00:00:00 2001 From: Ari Sundholm Date: Fri, 6 Nov 2020 01:22:17 +0200 Subject: [PATCH] sys_controller/Makefile: Add -flto to compiler/linker flags. This can (and does) considerably reduce the size of the resulting binary, and as a bonus, the binary also does work. ;) --- software/sys_controller/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/sys_controller/Makefile b/software/sys_controller/Makefile index f8ceeec..19acab7 100644 --- a/software/sys_controller/Makefile +++ b/software/sys_controller/Makefile @@ -196,7 +196,7 @@ APP_CFLAGS_UNDEFINED_SYMBOLS := APP_CFLAGS_OPTIMIZATION := -Os APP_CFLAGS_DEBUG_LEVEL := APP_CFLAGS_WARNINGS := -Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-function -Wno-packed-bitfield-compat -APP_CFLAGS_USER_FLAGS := -fdata-sections -ffunction-sections -fshort-enums -fgnu89-inline +APP_CFLAGS_USER_FLAGS := -fdata-sections -ffunction-sections -fshort-enums -fgnu89-inline -flto APP_ASFLAGS_USER := APP_LDFLAGS_USER := -Wl,--gc-sections