From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9114 invoked from network); 6 Jun 2001 16:33:25 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Jun 2001 16:33:25 -0000 Received: (qmail 2290 invoked by alias); 6 Jun 2001 16:33:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14772 Received: (qmail 2277 invoked from network); 6 Jun 2001 16:33:06 -0000 Date: Wed, 6 Jun 2001 12:33:14 -0400 From: David Lebel To: Andrej Borsenkow Cc: zsh-workers@sunsite.dk Subject: Re: dynamic linking on OpenBSD Message-ID: <20010606123314.B29541@lebel.org> References: <20010606121142.A29541@lebel.org> <003501c0eea5$ad2a02c0$21c9ca95@mow.siemens.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <003501c0eea5$ad2a02c0$21c9ca95@mow.siemens.ru>; from Andrej.Borsenkow@mow.siemens.ru on Wed, Jun 06, 2001 at 08:28:10PM +0400 Organization: None whatsover. X-URL: http://www.lebel.org/ Quoting Andrej Borsenkow (Andrej.Borsenkow@mow.siemens.ru): > 1. Could you please send diff against configure.in not configure? We do not > keep configure in CVS and it is hard to backport it. Even better, update to > current CVS and diff against zshconfig.ac. > > 2. Your patch looks like OpenBSD does not use ELF. Is it really the case? It does on some platform use ELF. On other (the majority), its a.out. By using ${CC} -shared -fPIC is a sure way to generate a proper .so across all the platforms (be it ELF or a.out). Here is the diff against configure.in: $OpenBSD$ --- configure.in.orig Tue Jun 5 18:52:48 2001 +++ configure.in Tue Jun 5 19:00:31 2001 @@ -1595,6 +1595,16 @@ char *argv[]; ;; esac else + case "$host" in + *openbsd*) + DLLD="${DLLD=$CC}" + DLLDARG="${LDARG}" + ;; + * ) + DLLD="${DLLD=ld}" + DLLDARG="" + ;; + esac DLLD="${DLLD=ld}" DLLDARG="" fi @@ -1615,7 +1625,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}" ;; Ciao, ...David -- // david lebel // // http://www.lebel.org/ http://www.nobiaze.com/ // // pgp: 3633 6999 D47E 73ED 099F 4341 08A4 8E48 EF56 61D1 //