[make] miscellaneous make system tweaks

-Have arch set the default optimization level. Most will use
 O2, but arm-m sets to Os.
-Make the link time garbage collection be optional. Only set
 for arm-m.
This commit is contained in:
Travis Geiselbrecht
2014-03-22 21:03:03 -07:00
parent 450de308e6
commit f21ad5d749
5 changed files with 30 additions and 14 deletions

View File

@@ -1,3 +1,9 @@
# use linker garbage collection, if requested
ifeq ($(WITH_LINKER_GC),1)
GLOBAL_COMPILEFLAGS += -ffunction-sections -fdata-sections
GLOBAL_LDFLAGS += --gc-sections
endif
$(OUTBIN): $(OUTELF)
@echo generating image: $@
$(NOECHO)$(SIZE) $<