summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--zshconfig.ac29
2 files changed, 32 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ae16ec9a1..8c22572cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,11 @@
* 15772: Src/Modules/tcp.c: add -t (test) for ztcp.
+2001-09-09 Bart Schaefer <schaefer@zsh.org>
+
+ * David Lebel: 15742: zshconfig.ac: Shared object linkage on
+ OpenBSD.
+
2001-09-09 Clint Adams <clint@zsh.org>
* 15770: Src/Modules/tcp.c, Src/Modules/tcp.h:
diff --git a/zshconfig.ac b/zshconfig.ac
index 92afdb1ca..c01421c41 100644
--- a/zshconfig.ac
+++ b/zshconfig.ac
@@ -1612,7 +1612,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}"
;;
* )
@@ -1638,11 +1645,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