Skip to content

Commit

Permalink
Merge pull request #5713 from basilfx/bugfix/msp430_linker
Browse files Browse the repository at this point in the history
boards: msp430: garbage collect dead code when linking.
  • Loading branch information
miri64 authored Aug 5, 2016
2 parents 16cae97 + 7cf1c46 commit f1b519d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpu/Makefile.include.msp430_common
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ export TARGET_ARCH ?= msp430

# define build specific options
CFLAGS_CPU = -mmcu=$(CPU_MODEL)
CFLAGS_LINK =
CFLAGS_LINK = -ffunction-sections -fdata-sections
CFLAGS_DBG = -gdwarf-2
CFLAGS_OPT ?= -Os
# export compiler flags
export CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
# export assmebly flags
export ASFLAGS += $(CFLAGS_CPU) --defsym $(CPU_MODEL)=1 $(CFLAGS_DBG)
# export linker flags
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -static -lgcc
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -Wl,--gc-sections -static -lgcc

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

0 comments on commit f1b519d

Please sign in to comment.