This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libffi GCC vs. end user development


David Ayers wrote:
Hello folks,

Anthony Green mentioned that libffi as shipped with GCC is currently for
use in gcj.  The GNU ObjC runtime which also comes with GCC could also
use libffi to implement it's forwarding which currently based on
builtin_apply.  Currently this is hardly used as far as I'm aware.
GNUstep for example builds on top of libffi (or ffcall for older
platforms and architectures that libffi doesn't support).

I've been on and off on looking at how ObjC forwarding could be
implemented with libffi by libobjc which would enable some long standing
PR's to be fixed.  The first candidate would be to use the version that
currently already resides in GCC to avoid an external dependency.

So my questions are:
1) What exactly is the relation between GCC's libffi and gcj?
I merge patches between the two so they are roughly equivalent. Most of the deltas relate to configuration/build changes.

2) Is GCC's libffi only needed for the compiler or also for libjava
runtime?
It's only used for the runtime, so please go ahead and use GCC's libffi for ObjC.

3) Has it been modified in a way that it can only be useful for gcj?
No.
4) If it is used by the runtime, would you expect issues if it was also
used by the libobjc runtime and a third party ObjC Programm/Library also
used the stock libffi?
No, I don't think there would be any problems. We link libffi statically into libgcj and recommend that you do the same.

Anthony Green

Thank you for your time.
Cheers,
David Ayers




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]