Added gc-sections. Now unused functions are being garbage collected.

This commit is contained in:
Piotr Esden-Tempski
2010-12-27 21:30:12 +01:00
parent 81045ff279
commit 600d8c3458
2 changed files with 8 additions and 5 deletions

View File

@@ -24,7 +24,8 @@ PREFIX ?= arm-elf
CC = $(PREFIX)-gcc
AR = $(PREFIX)-ar
CFLAGS = -Os -g -Wall -Wextra -I../include -fno-common \
-mcpu=cortex-m3 -mthumb -Wstrict-prototypes
-mcpu=cortex-m3 -mthumb -Wstrict-prototypes \
-ffunction-sections -fdata-sections
# ARFLAGS = rcsv
ARFLAGS = rcs
OBJS = vector.o rcc.o gpio.o usart.o adc.o spi.o flash.o nvic.o \