|
@@ -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 $<"
|