applypatch: add -fPIC for libimgpatch in Chrome OS.
To make the static library position independent.
Bug: 26866274
Test: emerge-peppy imgdiff; sudo emerge imgdiff; emerge nyan imgdiff
Change-Id: I319e721ccfb6a51f63d31afa49f54aa7f607f4bf
diff --git a/applypatch/Makefile b/applypatch/Makefile
index fa6298d..de6d426 100644
--- a/applypatch/Makefile
+++ b/applypatch/Makefile
@@ -28,5 +28,6 @@
imgdiff: imgdiff.o bsdiff.o utils.o
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDLIBS) -o $@ $^
+libimgpatch.a utils.o: CXXFLAGS += -fPIC
libimgpatch.a: imgpatch.o bspatch.o utils.o
${AR} rcs $@ $^