Use $CC to link shared library to make sure crtbeginS.o gets linked in. Guess the configure.in patch isn't really needed, but good for completeness. What's the policy here?
Anybody within the ports team regularly pushing stuff upstream for bind? ok? Index: Makefile =================================================================== RCS file: /cvs/ports/net/isc-bind/Makefile,v retrieving revision 1.39 diff -u -p -r1.39 Makefile --- Makefile 14 Mar 2015 22:26:21 -0000 1.39 +++ Makefile 15 May 2015 21:23:10 -0000 @@ -3,7 +3,7 @@ COMMENT= Berkeley Internet Name Daemon: DNS server and tools V= 9.10.2 -REVISION= 0 +REVISION= 1 DISTNAME= bind-$V PKGNAME= isc-bind-${V:S/-P/pl/} Index: patches/patch-configure =================================================================== RCS file: patches/patch-configure diff -N patches/patch-configure --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-configure 15 May 2015 21:23:10 -0000 @@ -0,0 +1,20 @@ +$OpenBSD$ +--- configure.orig Wed Feb 18 02:55:55 2015 ++++ configure Fri May 15 23:18:18 2015 +@@ -20775,10 +20775,15 @@ if test "$dlopen" = "yes"; then + SO_LD="ld" + fi + ;; +- *-freebsd*|*-openbsd*|*-netbsd*) ++ *-freebsd*|*-netbsd*) + SO_CFLAGS="-fpic" + SO_LDFLAGS="-Bshareable -x" + SO_LD="ld" ++ ;; ++ *-openbsd*) ++ SO_CFLAGS="-fpic" ++ SO_LDFLAGS="-shared" ++ SO_LD="${CC}" + ;; + *-solaris*) + SO_CFLAGS="-KPIC" Index: patches/patch-configure_in =================================================================== RCS file: patches/patch-configure_in diff -N patches/patch-configure_in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-configure_in 15 May 2015 21:23:10 -0000 @@ -0,0 +1,20 @@ +$OpenBSD$ +--- configure.in.orig Wed Feb 18 02:55:55 2015 ++++ configure.in Fri May 15 23:11:43 2015 +@@ -4302,10 +4302,15 @@ if test "$dlopen" = "yes"; then + SO_LD="ld" + fi + ;; +- *-freebsd*|*-openbsd*|*-netbsd*) ++ *-freebsd*|*-netbsd*) + SO_CFLAGS="-fpic" + SO_LDFLAGS="-Bshareable -x" + SO_LD="ld" ++ ;; ++ *-openbsd*) ++ SO_CFLAGS="-fpic" ++ SO_LDFLAGS="-shared" ++ SO_LD="${CC}" + ;; + *-solaris*) + SO_CFLAGS="-KPIC"