From dde0e9ee0a55840a138c1f10e05dbadb1ac93f00 Mon Sep 17 00:00:00 2001
From: "lumbric (antares)" <lumbric@gmail.com>
Date: Tue, 5 Dec 2017 00:04:48 +0100
Subject: [PATCH] Add missing library in Makefile

When using RELOC_WORKAROUND library needs to be linked explicitly, otherwise
eeprom functions are not available.

Thanks to @rfjakob for finding the crucial hint to solve this issue.
---
 Marlin/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Marlin/Makefile b/Marlin/Makefile
index 150f07439ae..bd8baed4b8c 100644
--- a/Marlin/Makefile
+++ b/Marlin/Makefile
@@ -332,7 +332,7 @@ endif
 
 ifeq ($(RELOC_WORKAROUND), 1)
 LD_PREFIX=-nodefaultlibs
-LD_SUFFIX=-lm -lgcc -lc -lgcc
+LD_SUFFIX=-lm -lgcc -lc -lgcc -L$(ARDUINO_INSTALL_DIR)/hardware/tools/avr/avr/lib/avr6 -l$(MCU)
 endif
 
 #Check for Arduino 1.0.0 or higher and use the correct source files for that version