summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrey Borzenkov <bor@users.sourceforge.net>2001-06-06 16:55:23 +0000
committerAndrey Borzenkov <bor@users.sourceforge.net>2001-06-06 16:55:23 +0000
commit7b216856ab753f038bb2fb3ec07a5c26e5a28126 (patch)
treea2f3c2eaf1ac08e26c42cc3503eef272609b296e
parent368b4628bab781cedae1470b7bc62d3071481fc6 (diff)
downloadzsh-7b216856ab753f038bb2fb3ec07a5c26e5a28126.tar.gz
zsh-7b216856ab753f038bb2fb3ec07a5c26e5a28126.tar.xz
zsh-7b216856ab753f038bb2fb3ec07a5c26e5a28126.zip
14772: David Lebel <lebel@lebel.org>: OpenBSD dynamic linking
-rw-r--r--ChangeLog3
-rw-r--r--zshconfig.ac12
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 16e12aafd..bb9e26610 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,9 @@
 
 2001-06-06  Andrej Borsenkow  <bor@zsh.org>
 
+	* 14772: David Lebel <lebel@lebel.org>: zshconfig.ac: patch
+	for dynamic linking on OpenBSD
+
 	* unposted: Etc/zsh-development-guide: we now support autoconf-2.50
 
 	* 14766: Src/prompt.c: unify %l substitution (tty0, pts/3 etc)
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}" ;;