$OpenBSD: patch-libgo_configure,v 1.1.1.1 2021/08/15 18:42:11 pascal Exp $

Index: libgo/configure
--- libgo/configure.orig
+++ libgo/configure
@@ -694,6 +694,8 @@ LIBGO_IS_IRIX_FALSE
 LIBGO_IS_IRIX_TRUE
 LIBGO_IS_FREEBSD_FALSE
 LIBGO_IS_FREEBSD_TRUE
+LIBGO_IS_OPENBSD_FALSE
+LIBGO_IS_OPENBSD_TRUE
 LIBGO_IS_DARWIN_FALSE
 LIBGO_IS_DARWIN_TRUE
 go_include
@@ -10966,7 +10968,7 @@ openbsd*)
     *)				need_version=no  ;;
   esac
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  #finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
     case $host_os in
@@ -13916,6 +13918,10 @@ fi
 # architectures don't support it.  FIXME: We should set a default
 # based on the host.
 
+case ${host} in
+powerpc*-*-*) with_libffi_default=no ;;
+esac
+
 # Check whether --with-libffi was given.
 if test "${with_libffi+set}" = set; then :
   withval=$with_libffi; :
@@ -13974,6 +13980,7 @@ ALLGOOS="aix android darwin dragonfly freebsd hurd ill
 
 is_darwin=no
 is_freebsd=no
+is_openbsd=no
 is_irix=no
 is_linux=no
 is_netbsd=no
@@ -13987,6 +13994,7 @@ GOOS=unknown
 case ${host} in
   *-*-darwin*)   is_darwin=yes;  GOOS=darwin ;;
   *-*-freebsd*)  is_freebsd=yes; GOOS=freebsd ;;
+  *-*-openbsd*)  is_openbsd=yes; GOOS=openbsd ;;
   *-*-irix6*)    is_irix=yes;    GOOS=irix ;;
   *-*-linux*)    is_linux=yes;   GOOS=linux ;;
   *-*-netbsd*)	 is_netbsd=yes;  GOOS=netbsd ;;
@@ -14019,6 +14027,14 @@ fi
 else
   LIBGO_IS_IRIX_TRUE='#'
   LIBGO_IS_IRIX_FALSE=
+fi
+
+ if test $is_openbsd = yes; then
+  LIBGO_IS_OPENBSD_TRUE=
+  LIBGO_IS_OPENBSD_FALSE='#'
+else
+  LIBGO_IS_OPENBSD_TRUE='#'
+  LIBGO_IS_OPENBSD_FALSE=
 fi
 
  if test $is_linux = yes; then
