build: A few more cleanups. And use LTO.

This commit is contained in:
Solomon Peachy 2013-08-04 00:16:01 -04:00
parent 746fde533b
commit 03dd0312ff
1 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ $(MCU).ld: libs/$(MCU).ld.in inc/$(MCU)_hw.h
%.bin: %.elf
@$(E) " OBJCOPY " $@
$(Q)$(OBJCOPY) -O binary $(<:.bin=.elf) $@ #--remove-section .note.gnu.build-id
$(Q)$(OBJCOPY) -O binary $(<:.bin=.elf) --remove-section .note.gnu.build-id $@
%.o: %.c
@$(E) " CC " $<
@ -43,8 +43,9 @@ $(MCU).ld: libs/$(MCU).ld.in inc/$(MCU)_hw.h
-Wl,--gc-sections,-T$(MCU).ld \
-Wl,--whole-archive $(PROGRAM_LIBS) \
-Wl,--no-whole-archive $(LIBRARIES) \
-Wl,--build-id=none
# -Wl,-allow-multiple-definition -flto=$(JLEVEL)
-Wl,--build-id=none \
-flto=$(JLEVEL)
# -Wl,-allow-multiple-definition
# Cleaning up..
clean:
@ -76,7 +77,6 @@ distclean: clean
${ECHO} "${TOOLCHAIN_CONFIG} missing! Exiting." ; \
exit 1 ;\
fi ; \
${ECHO} -ne "\033]0;Building Toolchain...\007" ; \
${RM} -Rf ${TOOLCHAIN_SRC_DIR}/.build ; \
cd ${TOOLCHAIN_SRC_DIR} ; \
./configure --enable-local && \