about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-09-09 16:37:03 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-09-09 16:37:03 +0000
commit7670eee717467ec7c78ce640d911a58bc5145d66 (patch)
tree5ee4edd31d06182976a50e2d71d4a45f04805708
parentb000083cf4b533f65740783b169203fb1605aa69 (diff)
downloadzsh-7670eee717467ec7c78ce640d911a58bc5145d66.tar.gz
zsh-7670eee717467ec7c78ce640d911a58bc5145d66.tar.xz
zsh-7670eee717467ec7c78ce640d911a58bc5145d66.zip
David Lebel: Shared object linkage on OpenBSD.
-rw-r--r--ChangeLog5
-rw-r--r--zshconfig.ac29
2 files changed, 32 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index da98554d5..e7570690f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-09-09  Bart Schaefer  <schaefer@brasslantern.com>
+
+	* David Lebel: 15742: zshconfig.ac: Shared object linkage on
+	OpenBSD.
+
 2001-09-09  Geoff Wing  <gcw@zsh.org>
 	
 	* 15621: Src/Zle/zle_refresh.c: display of status line was being
diff --git a/zshconfig.ac b/zshconfig.ac
index a2f2c45d5..e70099a38 100644
--- a/zshconfig.ac
+++ b/zshconfig.ac
@@ -1602,7 +1602,14 @@ char *argv[];
   else
     case "$host" in
       *openbsd*)
-	DLLD="${DLLD=$CC}"
+	case "$host_os" in
+	  openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	    DLLD="${DLLD=ld}"
+	  ;;
+	  *)
+	    DLLD="${DLLD=$CC}"
+	  ;;
+	esac
 	DLLDARG="${LDARG}"
       ;;
       * )
@@ -1628,11 +1635,29 @@ char *argv[];
     netbsd*)      DLLDFLAGS="${DLLDFLAGS=${DLLDARG}-x -shared --whole-archive}" ;;
     aix*)         DLLDFLAGS="${DLLDFLAGS=-G -bexpall -lc}" ;;
     solaris*|sysv4*|esix*) DLLDFLAGS="${DLLDFLAGS=-G}" ;;
-    openbsd*)     DLLDFLAGS="${DLLDFLAGS=-shared -fPIC}" ;;
+    openbsd*)
+      if test $zsh_cv_sys_elf = yes; then
+	DLLDFLAGS="${DLLDFLAGS=-shared -fPIC}"
+      else
+	case "$host_os" in
+	  openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	   DLLDFLAGS="${DLLDFLAGS=-Bshareable}"
+	  ;;
+	  *)
+	    DLLDFLAGS="${DLLDFLAGS=-shared -fPIC}"
+	  ;;
+	esac
+      fi
+    ;;
   esac
   case "$host" in
     *-hpux*)  EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-Wl,-E}" ;;
     *-freebsd[3-9]*|*-linux*) EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-rdynamic}" ;;
+    *openbsd*)
+       if test $zsh_cv_sys_elf = yes; then
+	 EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-Wl,-E}"
+       fi
+    ;;
     mips-sni-sysv4)
       #
       # unfortunately, we have different compilers