From 839c6fc1e68a0404b0703e53fa9c79a81447f00c Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Fri, 16 Sep 2022 13:03:34 +0200 Subject: [PATCH] Linux: Remove unused code from final binary Signed-off-by: Simon Rozman --- include/props.mak | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/props.mak b/include/props.mak index 096067f..384c2bb 100644 --- a/include/props.mak +++ b/include/props.mak @@ -8,8 +8,9 @@ CFLAGS := $(CFLAGS) -Og -g CXXFLAGS := $(CXXFLAGS) -Og -g else CPPFLAGS := $(CPPFLAGS) -DNDEBUG -CFLAGS := $(CFLAGS) -O3 -CXXFLAGS := $(CXXFLAGS) -O3 +CFLAGS := $(CFLAGS) -O3 -fdata-sections -ffunction-sections +CXXFLAGS := $(CXXFLAGS) -O3 -fdata-sections -ffunction-sections +LDFLAGS := $(LDFLAGS) -Wl,--gc-sections endif OBJS := $(SRCS:%=%.o)