From 314eb67b239e60c2ed3700e2baf9cd0e590465f3 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Thu, 27 Oct 2016 09:19:18 -0400
Subject: [PATCH] Use -z muldefs to avoid the multiple definitions bug
 without -flto

This fixes github issue #64

Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 Make.defaults | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Make.defaults b/Make.defaults
index aa974d9..c9d599f 100644
--- a/Make.defaults
+++ b/Make.defaults
@@ -32,6 +32,7 @@ cflags	= $(CFLAGS) -I${TOPDIR}/src/include/efivar/ \
 clang_ccldflags =
 gcc_ccldflags =
 ccldflags = $(cflags) -L. $(CCLDFLAGS) $(LDFLAGS) \
+	-Wl,-z,muldefs \
 	$(if $(findstring clang,$(CCLD)),$(clang_ccldflags),) \
 	$(if $(findstring gcc,$(CCLD)),$(gcc_ccldflags),) \
 	$(call pkg-config-ccldflags)
-- 
2.10.2

