From 29571f71692e28ce9a17d1450097a98492f3b465 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 2 Feb 2018 22:54:04 -0800
Subject: [PATCH 2/2] libopeniscsiusr: Add CFLAGS to linker cmdline

This will ensure that -fPIC is passed to linker as
well

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 libopeniscsiusr/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libopeniscsiusr/Makefile b/libopeniscsiusr/Makefile
index 8b9b523..4f1d0d6 100644
--- a/libopeniscsiusr/Makefile
+++ b/libopeniscsiusr/Makefile
@@ -49,7 +49,7 @@ LIBADD =
 all: $(LIBS) $(LIBS_MAJOR) $(TESTS) doc
 
 $(LIBS): $(OBJS)
-	$(CC) $(LDFLAGS) -shared -Wl,-soname=$@ -o $@ $(OBJS) $(LIBADD)
+	$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname=$@ -o $@ $(OBJS) $(LIBADD)
 	ln -sf $@ $(DEVLIB)
 
 $(LIBS_MAJOR): $(LIBS)
-- 
2.16.1

