[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: [Gcl-devel] Re: portable cdecl 'elliptic' function
From: |
Camm Maguire |
Subject: |
[Axiom-developer] Re: [Gcl-devel] Re: portable cdecl 'elliptic' function calls |
Date: |
31 Jul 2003 17:50:52 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings, and thanks!
Fergus Henderson <address@hidden> writes:
> On 31-Jul-2003, Mike Thomas <address@hidden> wrote:
> > Fergus, did you use it [libffi] in the Cygwin port of Mercury?
>
> No.
>
> 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.
>
OK, so what I'd like to know is how important is an unlimited number
of arguments to a compiled function call? I'm guessing that the
Debian platform coverage for libffi is probably pretty good, and I
don't think Windows would be too far behind. Mac OS X, solaris,
others I don't know. I think its probably worth a configure
option. This may force some ports to maintain a larger switch
statement if some programs make use of this before libffi is ported,
but I don't think that is a major impediment. Opinions?
Take care,
> --
> 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.
>
>
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
Re: [Axiom-developer] portable cdecl 'elliptic' function calls, Arthur Norman, 2003/07/29