浏览代码

reduce binary size of .hex

still a few bytes bigger than with arduino but nothing major
Markus Towara 8 年前
父节点
当前提交
23a675f621
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      Marlin/Makefile

+ 2
- 1
Marlin/Makefile 查看文件

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

正在加载...
取消
保存