From b0db51a268ac26de7de8f6e4d4108bf62a73f7ef Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Tue, 15 Nov 2022 15:21:43 +0100
Subject: [PATCH] contrib: freetype: build with PIC

I got a Linux x86-64 build complaining it was not built with PIC.

/usr/bin/ld: /root/build/contrib/x86_64-linux-gnu/lib/libfreetype.a(truetype.c.o): warning: relocation against `TT_RunIns' in read-only section `.text'
/usr/bin/ld: /root/build/contrib/x86_64-linux-gnu/lib/libfreetype.a(truetype.c.o): relocation R_X86_64_PC32 against symbol `TT_RunIns' can not be used when making a shared object; recompile with -fPIC
---
 contrib/src/freetype2/rules.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/src/freetype2/rules.mak b/contrib/src/freetype2/rules.mak
index b7d76004f28b..c5775aced915 100644
--- a/contrib/src/freetype2/rules.mak
+++ b/contrib/src/freetype2/rules.mak
@@ -29,7 +29,7 @@ ifndef AD_CLAUSES
 	$(REQUIRE_GPL)
 endif
 	$(CMAKECLEAN)
-	$(HOSTVARS) $(CMAKE) $(FREETYPE_CONF)
+	$(HOSTVARS) $(CMAKE_PIC) $(FREETYPE_CONF)
 	+$(CMAKEBUILD)
 	$(CMAKEINSTALL)
 	touch $@
-- 
GitLab