Description: Pass -lLTO after gold-plugin.o so that it gets used in systems
 that default to --as-needed.
Origin: upstream, http://llvm.org/viewvc/llvm-project?view=rev&revision=162652
Bug: http://llvm.org/bugs/show_bug.cgi?id=13262
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1026359

--- a/tools/gold/Makefile
+++ b/tools/gold/Makefile
@@ -24,6 +24,8 @@
 # Because off_t is used in the public API, the largefile parts are required for
 # ABI compatibility.
 CXXFLAGS += -I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-CXXFLAGS += -L$(SharedLibDir)/$(SharedPrefix) -lLTO
+LDFLAGS += -L$(SharedLibDir)/$(SharedPrefix)
 
 include $(LEVEL)/Makefile.common
+
+LIBS += -lLTO
