about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrey Borzenkov <bor@users.sourceforge.net>2001-06-06 17:12:34 +0000
committerAndrey Borzenkov <bor@users.sourceforge.net>2001-06-06 17:12:34 +0000
commit4ec7323272bc6559ca16f57cab59418307636823 (patch)
tree27e130a50da72e547b301793c3fab4b23c21a9f3
parentb94aaa20e32214b421cb5e4706f3c0375cd0014c (diff)
downloadzsh-4ec7323272bc6559ca16f57cab59418307636823.tar.gz
zsh-4ec7323272bc6559ca16f57cab59418307636823.tar.xz
zsh-4ec7323272bc6559ca16f57cab59418307636823.zip
14772: David Lebel <lebel@lebel.org>: patch for dynamic linking on OpenBSD
-rw-r--r--ChangeLog3
-rw-r--r--zshconfig.ac12
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 97e28c21b..85afb09e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2001-06-06  Andrej Borsenkow <bor@zsh.org>
 
+	* 14772: David Lebel <lebel@lebel.org>: zshconfig.ac: patch
+	for dynamic linking on OpenBSD
+
 	* 14679, Bart 14693, 14758, 14760: configure.ac, zshconfig.ac,
 	.distfiles, Makefile.in, configure.in, Src/mkmakemod.sh: Allow
 	processing by both autoconf-2.13 and autoconf-2.50; remove
diff --git a/zshconfig.ac b/zshconfig.ac
index f2b2ea263..3aee9fb08 100644
--- a/zshconfig.ac
+++ b/zshconfig.ac
@@ -1594,6 +1594,16 @@ char *argv[];
       ;;
     esac
   else
+    case "$host" in
+      *openbsd*)
+	DLLD="${DLLD=$CC}"
+	DLLDARG="${LDARG}"
+      ;;
+      * )
+	DLLD="${DLLD=ld}"
+	DLLDARG=""
+      ;;
+    esac
     DLLD="${DLLD=ld}"
     DLLDARG=""
   fi
@@ -1614,7 +1624,7 @@ 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=-Bshareable}" ;;
+    openbsd*)     DLLDFLAGS="${DLLDFLAGS=-shared -fPIC}" ;;
   esac
   case "$host" in
     *-hpux*)  EXTRA_LDFLAGS="${EXTRA_LDFLAGS=-Wl,-E}" ;;