From 948aa481fa136185771fc85b4b8abaffe3795aef Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Mon, 30 Sep 2013 09:29:24 -0300 Subject: [PATCH] Don't include dead code when linking program (saves 48kB) --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0df793e8..c199b853 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,8 @@ TARGET ?= PicoDrive CFLAGS += -Wall -ggdb -falign-functions=2 CFLAGS += -I. ifndef DEBUG -CFLAGS += -O2 -DNDEBUG +CFLAGS += -O2 -DNDEBUG -ffunction-sections +LDFLAGS += -Wl,--gc-sections endif #CFLAGS += -DEVT_LOG #CFLAGS += -DDRC_CMP -- 2.39.5