From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8876 invoked from network); 6 Jun 2001 16:11:59 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Jun 2001 16:11:59 -0000 Received: (qmail 26324 invoked by alias); 6 Jun 2001 16:11:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14767 Received: (qmail 26309 invoked from network); 6 Jun 2001 16:11:39 -0000 Date: Wed, 6 Jun 2001 12:11:43 -0401 From: David Lebel To: zsh-workers@sunsite.dk Subject: dynamic linking on OpenBSD Message-ID: <20010606121142.A29541@lebel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Organization: None whatsover. X-URL: http://www.lebel.org/ 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 // // http://www.lebel.org/ http://www.nobiaze.com/ // // pgp: 3633 6999 D47E 73ED 099F 4341 08A4 8E48 EF56 61D1 //