\r
## Compile options common for all C compilation units.\r
CFLAGS = $(COMMON)\r
- CFLAGS += -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums\r
+ CFLAGS += -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -ffunction-sections\r
+ CFLAGS += -fno-inline-small-functions -fno-split-wide-types\r
CFLAGS += -Wall -Wstrict-prototypes -Wundef -Wa,-adhlns=./$(*F).lst\r
+CFLAGS += -fno-inline-small-functions -fno-split-wide-types\r
CFLAGS += -MMD -MP -MF dep/$(@F).d \r
CFLAGS += -DLIION\r
\r
\r
## Linker flags\r
LDFLAGS = $(COMMON)\r
- LDFLAGS += -Wl,-Map=$(PROJECT).map,--cref -Wl,-relax\r
+ LDFLAGS += -Wl,-Map=$(PROJECT).map,--cref -Wl,-relax -Wl,-gc-sections\r
\r
## Intel Hex file production flags\r
HEX_FLASH_FLAGS = -R .eeprom\r