Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

OpenBSD zshconfig.ac patches



Hello,

I previously sent patches to enable proper linking of .so modules on
OpenBSD.  These patches were appropriate for the current version of
OpenBSD, and were only really appropriate for a.out architectures and
were flawed for ELF.  They are also appropriate for any versions for
OpenBSD.

This patch apply to the release version of 4.0.2's zshconfig.ac.

I guess configure should be generated from that.

Thanks to brad@xxxxxxxxxxx to working them out.

Ciao,
  ...David


---cut---
$OpenBSD: patch-zshconfig_ac,v 1.1 2001/09/07 02:11:47 lebel Exp $
--- zshconfig.ac.orig	Tue Jun 26 06:08:54 2001
+++ zshconfig.ac	Thu Sep  6 13:24:37 2001
@@ -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}"
       ;;
       * )
@@ -1630,11 +1637,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

-- 
// david lebel <lebel@{lebel.org,nobiaze.com,openbsd.org}> //
// http://www.lebel.org/           http://www.nobiaze.com/ //
// pgp: 3633 6999 D47E 73ED 099F  4341 08A4 8E48 EF56 61D1 //



Messages sorted by: Reverse Date, Date, Thread, Author