From fc19701ec4319255f2f46415ee632822c3b706b9 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Mon, 6 Jun 2016 19:58:39 -0500 Subject: [PATCH] Ask gcc nicely to aggresively remove unwanted functions from output --- avr/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/avr/Makefile b/avr/Makefile index e368e72..46b910a 100644 --- a/avr/Makefile +++ b/avr/Makefile @@ -7,8 +7,9 @@ HEADER_SUBDIR = tabby CROSS = avr- CC = $(CROSS)gcc -CFLAGS = $(CGFLAGS) -Wall -Os -mmcu=atmega2560 -I$(INCLUDE_PATH) \ - -DF_CPU=$(CLOCK_SPEED) -DUSE_2X +CFLAGS = $(CGFLAGS) -Wall -Os -mmcu=atmega2560 \ + -fdata-sections -ffunction-sections -Wl,--gc-sections \ + -I$(INCLUDE_PATH) -DF_CPU=$(CLOCK_SPEED) -DUSE_2X LDFLAGS = OBJCOPY = $(CROSS)objcopy