$OpenBSD: patch-configure,v 1.27 2015/12/14 16:49:02 feinerer Exp $

Unbreak build on powerpc (relocation truncated to fit: R_PPC_GOT16...)

--- configure.orig	Thu Dec 10 15:45:13 2015
+++ configure	Thu Dec 10 15:47:05 2015
@@ -26576,6 +26576,22 @@ $as_echo "$as_me: WARNING: Use of flat namespace is re
       main_ldflags="${wl}-export-dynamic"
       shlib_ldflags="-shared -fPIC"
     fi
+    case "${host_cpu}" in
+      powerpc*)
+	## GCC -fpic limits to 2**16 on OpenBSD powerpc.
+	## Error message without -fPIC:
+	##   relocation truncated to fit: R_PPC_GOT16...
+        if test "${GCC}" = yes; then
+          cpicflags="-fPIC"
+        fi
+        if test "${G77}" = yes; then
+          fpicflags="-fPIC"
+        fi
+        if test "${GXX}" = yes; then
+          cxxpicflags="-fPIC"
+        fi
+        ;;
+    esac
     ;;
   osf*)
     cpicflags=
