[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: [Gcl-devel] Re: portable cdecl 'elliptic' function
[Axiom-developer] Re: [Gcl-devel] Re: portable cdecl 'elliptic' function calls
Thu, 31 Jul 2003 23:52:52 +1000
On 31-Jul-2003, Mike Thomas <address@hidden> wrote:
> Fergus, did you use it [libffi] in the Cygwin port of Mercury?
Camm Maguire <address@hidden> wrote:
> | Greetings, and thank you for this tip! I now think I see how to do
> | this in GCL, and would like to build in dependency on libffi. Is this
> | available on everyone's systems? I'm assuming its packaged at least
> | everywhere gcc is available. What about solaris, Mac OS X?
You should not assume that libffi is implemented everywhere that gcc is
available. The reason that libffi is included in the GCC distribution
is, I think, because it is used by the Java interpreter. That is a lot
less widely ported than the GNU C compiler, I would imagine.
The libffi implementation is by its nature not portable;
its implementation depends on the platform's calling convention.
However, the interface is portable, and by using libffi,
the work of implementing this interface for a bunch of different
calling conventions can be shared between all the different
projects that need this functionality.
The difficulty of porting libffi to a different OS will depend on
whether that OS uses the same calling convention as one that libffi
already supports. If so, as is the case with Cygwin, then it should
be very little work. If not, it might be a lot of work.
Fergus Henderson <address@hidden> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
Re: [Axiom-developer] portable cdecl 'elliptic' function calls, Arthur Norman, 2003/07/29