Browse Source

reduce binary size of .hex

still a few bytes bigger than with arduino but nothing major
pull/1/head
Markus Towara 8 years ago
parent
commit
23a675f621
  1. 3
      Marlin/Makefile

3
Marlin/Makefile

@ -387,6 +387,7 @@ CDEBUG = -g$(DEBUG)
CWARN = -Wall -Wstrict-prototypes CWARN = -Wall -Wstrict-prototypes
CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct \ CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct \
-fshort-enums -w -ffunction-sections -fdata-sections \ -fshort-enums -w -ffunction-sections -fdata-sections \
-flto \
-DARDUINO=$(ARDUINO_VERSION) -DARDUINO=$(ARDUINO_VERSION)
ifneq ($(HARDWARE_MOTHERBOARD),) ifneq ($(HARDWARE_MOTHERBOARD),)
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD} CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
@ -510,7 +511,7 @@ extcoff: $(TARGET).elf
# Link: create ELF output file from library. # Link: create ELF output file from library.
$(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h $(BUILD_DIR)/$(TARGET).elf: $(OBJ) Configuration.h
$(Pecho) " CXX $@" $(Pecho) " CXX $@"
$P $(CC) $(ALL_CXXFLAGS) -Wl,--gc-sections -o $@ -L. $(OBJ) $(LDFLAGS) $P $(CC) $(ALL_CXXFLAGS) -Wl,--gc-sections,--relax -o $@ -L. $(OBJ) $(LDFLAGS)
$(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE) $(BUILD_DIR)/%.o: %.c Configuration.h Configuration_adv.h $(MAKEFILE)
$(Pecho) " CC $<" $(Pecho) " CC $<"

Loading…
Cancel
Save