From 9ecba0c2f88cdd119c5da9fa279bcab79a03b43b Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon, 19 May 2003 17:51:01 +0000
Subject: [PATCH] Use -fPIC on Sparc, per Tom Callaway.

---
 src/makefiles/Makefile.linux | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/makefiles/Makefile.linux b/src/makefiles/Makefile.linux
index 2b204f9d853..c40355240b2 100644
--- a/src/makefiles/Makefile.linux
+++ b/src/makefiles/Makefile.linux
@@ -4,7 +4,12 @@ rpath = -Wl,-rpath,$(libdir)
 shlib_symbolic = -Wl,-Bsymbolic
 allow_nonpic_in_shlib = yes
 DLSUFFIX = .so
+
+ifeq "$(findstring sparc,$(host_cpu))" "sparc"
+CFLAGS_SL = -fPIC
+else
 CFLAGS_SL = -fpic
+endif
 
 %.so: %.o
 	$(CC) -shared -o $@ $<
-- 
GitLab