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

dynamic linking on OpenBSD



Hello,
 
I'm the maintainer of the zsh port for OpenBSD in its ports tree, and
the way configure setup dynamic linking for OpenBSD is wrong.  Well, it
does work for most of the OpenBSD platform, but its not correct.
DLLDFLAGS should be "-shared -fPIC" and the linker should be ${CC} not
ld.
 
Here is a trivial diff to the configure script so it works correctly.
Adapt to your liking.
 
Ciao,
  ...David

$OpenBSD$
--- configure.orig	Tue Jun  5 18:51:53 2001
+++ configure	Tue Jun  5 18:58:37 2001
@@ -6767,8 +6767,16 @@ echo "$ac_t""$zsh_cv_sys_elf" 1>&6
       ;;
     esac
   else
-    DLLD="${DLLD=ld}"
-    DLLDARG=""
+    case "$host" in
+      *openbsd*)
+	DLLD="${DLLD=$CC}"
+	DLLDARG="${LDARG}"
+      ;;
+      * )
+	DLLD="${DLLD=ld}"
+	DLLDARG=""
+      ;;
+    esac
   fi
   if test -n "$GCC"; then
     DLCFLAGS="${DLCFLAGS=-fpic}"
@@ -6787,7 +6795,7 @@ echo "$ac_t""$zsh_cv_sys_elf" 1>&6
     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}" ;;

-- 
// 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