Skip to content

Commit 7cf1c46

Browse files
committed
boards: msp430-common: remove dead code when linking.
1 parent 355e6b1 commit 7cf1c46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpu/Makefile.include.msp430_common

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ export TARGET_ARCH ?= msp430
33

44
# define build specific options
55
CFLAGS_CPU = -mmcu=$(CPU_MODEL)
6-
CFLAGS_LINK =
6+
CFLAGS_LINK = -ffunction-sections -fdata-sections
77
CFLAGS_DBG = -gdwarf-2
88
CFLAGS_OPT ?= -Os
99
# export compiler flags
1010
export CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
1111
# export assmebly flags
1212
export ASFLAGS += $(CFLAGS_CPU) --defsym $(CPU_MODEL)=1 $(CFLAGS_DBG)
1313
# export linker flags
14-
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -static -lgcc
14+
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -Wl,--gc-sections -static -lgcc
1515

1616
# Import all toolchain settings
1717
include $(RIOTCPU)/Makefile.include.gnu

0 commit comments

Comments
 (0)