Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh-3.1 development: dynamic modules
- X-seq: zsh-workers 2329
- From: Peter Stephenson <pws@xxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: zsh-3.1 development: dynamic modules
- Date: Thu, 07 Nov 1996 17:05:52 +0100
- In-reply-to: "Zoltan Hidvegi"'s message of "Wed, 06 Nov 1996 22:38:05 MET." <199611062138.WAA21625@xxxxxxxxxxxxxxxxx>
Zoltan Hidvegi wrote:
> I have stared working on binary module support in zsh. The preliminary
> version is almost usable. I tested it on ELF Linux SunOS and Solaris and
> it seems to work. Of course the most difficult part is to make it
> portable. I looked at the perl sources for that but I not yet added
> everything which is there.
Success on IRIX 5.3 (which is ELF) using gcc (haven't tried the native
compiler yet) with the following minor changes: (1) gcc didn't like
the hacked-up version of the prototype ANSIfier, it doesn't strip
enough parentheses (2) -shared was required on linking the example
module to prevent it trying to find `main' etc. I would suggest that
all ELF/gcc combinations use -shared; maybe it's always necessary with
gcc but I don't know how that interacts with ld in the general case.
I've also added what must be a missing $ before a GCC test a few lines
later. autoconf's not working here at the moment so I haven't
actually used the patched configure.in.
*** Src/mod_example.c.old Thu Nov 7 16:45:55 1996
--- Src/mod_example.c Thu Nov 7 16:39:28 1996
***************
*** 31,37 ****
#include <stdio.h>
! #define _(X) (X)
typedef int (*HandlerFunc) _((char *, char **, char *, int));
--- 31,37 ----
#include <stdio.h>
! #define _(X) X
typedef int (*HandlerFunc) _((char *, char **, char *, int));
*** configure.in.old Thu Nov 7 16:46:45 1996
--- configure.in Thu Nov 7 17:00:50 1996
***************
*** 666,675 ****
DL_EXT="${DL_EXT=so}"
if test $zsh_cv_sys_elf = yes; then
DLLD="${DLLD=$CC}"
else
DLLD="${DLLD=ld}"
fi
! if test -n "GCC"; then
DLCFLAGS="${DLCFLAGS=-fpic}"
else
case "$host_os" in
--- 666,678 ----
DL_EXT="${DL_EXT=so}"
if test $zsh_cv_sys_elf = yes; then
DLLD="${DLLD=$CC}"
+ if test -n "$GCC"; then
+ DLLDFLAGS="${DLLDFLAGS=-shared}"
+ fi
else
DLLD="${DLLD=ld}"
fi
! if test -n "$GCC"; then
DLCFLAGS="${DLCFLAGS=-fpic}"
else
case "$host_os" in
--
Peter Stephenson <pws@xxxxxx> Tel: +49 33762 77366
WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77413
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author