Merge pull request #133 from darconeous/pull-requests/cpu-avr-gc-sections
cpu/avr: Make sure that GCC removes all unused symbols.
This commit is contained in:
commit
a8dc74bda8
|
@ -106,6 +106,15 @@ endif
|
||||||
LDFLAGS += -mmcu=$(MCU) -Wl,-Map=contiki-$(TARGET).map \
|
LDFLAGS += -mmcu=$(MCU) -Wl,-Map=contiki-$(TARGET).map \
|
||||||
-Wl,--section-start=.bootloader=$(BOOTLOADER_START)
|
-Wl,--section-start=.bootloader=$(BOOTLOADER_START)
|
||||||
|
|
||||||
|
SMALL ?= 1
|
||||||
|
|
||||||
|
### These flags help significantly reduce the code size
|
||||||
|
ifeq ($(SMALL),1)
|
||||||
|
CFLAGS += -ffunction-sections
|
||||||
|
CFLAGS += -fdata-sections
|
||||||
|
LDFLAGS += -Wl,--gc-sections
|
||||||
|
endif # SMALL
|
||||||
|
|
||||||
### Setup directory search path for source files
|
### Setup directory search path for source files
|
||||||
|
|
||||||
CONTIKI_TARGET_DIRS_CONCAT = ${addprefix $(CONTIKI)/platform/$(TARGET)/, \
|
CONTIKI_TARGET_DIRS_CONCAT = ${addprefix $(CONTIKI)/platform/$(TARGET)/, \
|
||||||
|
|
Loading…
Reference in a new issue