ffcall/libffi for NetBSD/SPARC (was: Re: Objective-C programming)

David Ayers <[email protected]>
Newsgroups gmane.comp.lib.gnustep.user
Message-ID <[email protected]>
Adam Fedor schrieb:
> 
> On Sep 30, 2005, at 2:45 PM, Mehul N. Sanghvi wrote:
> 
>>
>> As far as I can tell, there isn't a ffi library on NetBSD, at least I
>> don't see on in /usr/pkgsrc.  Does it come as part of gnustep-base ?
>>
> 
> I think there might be a bug in ffcall for NetBSD/Sparc, but I'll have
> to look around to remember that. I don't think ffi is an  option, but
> it's possible - it comes with gcc, so you would have to look to see if
> there is, say, a gcc-libffi package or perhaps compile from source (if
> it works on your OS).
> 

Hello Folks,

Riccardo and I have attempted to track down NetBSD/SPARC's ffcall issues
(I'm not sure anymore whether our issues are limited to the 64 bit
versions).  AFAIR there is no support in gcc's libffi for NetBSD/SPARC
and ffcall's configure script relies on code using undefined behavior to
determine aspects such as whether small structs are returned via
registers.  When I tried to distill this I even found differing results
dependent on optimization levels.

I wanted to add an explicit configure flag but it seems that changing
configure scripts for ffcall is a non trivial task involving special
directory layout and cross compilers.

I think it will take someone with more intimate knowledge of the ABI
issues of NetBSD/SPARC and the time to dig into ffcall (incl. it's
autoconf machinery) to actually port ffcall to NetBSD/SPARC(64).  Maybe
it will be easier to port libffi for someone familiar with
NetBSD/SPARC(64), but I really just don't know.

Cheers,
David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.