You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brad <br...@comstyle.com> on 2000/11/07 16:05:29 UTC

[PATCH] shared libraries on OpenBSD

Here is a patch that has been created against the latest 1.3.x src to use
"cc -shared" to create shared libraries on OpenBSD 2.8 and up.

// Brad

brad@comstyle.com
brad@openbsd.org

--- src/helpers/GuessOS.orig	Sun Nov  5 00:12:06 2000
+++ src/helpers/GuessOS	Tue Nov  7 09:04:39 2000
@@ -165,7 +165,8 @@
 	;;
 
     OpenBSD:*)
-	echo "${MACHINE}-whatever-openbsd"; exit 0
+	OPENBSDVERS=`echo ${RELEASE}|sed -e 's/[-(].*//'`
+	echo "${MACHINE}-whatever-openbsd${OPENBSDVERS}"; exit 0
 	;;
 
     OSF1:*:*:*alpha*)
--- src/Configure.orig	Sun Nov  5 00:12:05 2000
+++ src/Configure	Tue Nov  7 09:04:39 2000
@@ -1086,8 +1086,17 @@
 	    fi  
 	    ;;
 	*-openbsd*)
+	    PLATOSVERS=`echo $PLAT | sed 's/^.*openbsd//'`
 	    CFLAGS_SHLIB="-fPIC"
-	    LDFLAGS_SHLIB="-Bforcearchive -Bshareable"
+	    case "$PLATOSVERS" in
+		2.[01234567])
+		   LDFLAGS_SHLIB="-Bshareable -Bforcearchive"
+		;;
+		*)
+		   LD_SHLIB="gcc"
+		   LDFLAGS_SHLIB="-shared \$(CFLAGS_SHLIB)"
+		;;
+	    esac
 	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
 	    LDFLAGS_SHLIB_EXPORT=""
 	    SHLIB_SUFFIX_DEPTH=2


Re: [PATCH] shared libraries on OpenBSD

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Tue, Nov 07, 2000 at 10:05:29AM -0500, Brad wrote:
> Here is a patch that has been created against the latest 1.3.x src to use
> "cc -shared" to create shared libraries on OpenBSD 2.8 and up.

Committed. Thanks!

  Martin
-- 
<Ma...@Fujitsu-Siemens.com>    |       Fujitsu Siemens
       <ma...@apache.org>              |   81730  Munich,  Germany