blob: 3fa6c74cdbb4f765dfa289b6ca85b112586066f7 [file] [log] [blame]
Anthony Greenc6dddbd2009-10-04 08:11:33 -04001Status
2======
3
Anthony Greenf7c0bc62009-12-25 01:22:11 -05004libffi-3.0.9 was released on December XX, 2009. Check the libffi web
Anthony Greenc6dddbd2009-10-04 08:11:33 -04005page for updates: <URL:http://sourceware.org/libffi/>.
6
7
8What is libffi?
9===============
10
11Compilers for high level languages generate code that follow certain
12conventions. These conventions are necessary, in part, for separate
13compilation to work. One such convention is the "calling
14convention". The "calling convention" is essentially a set of
15assumptions made by the compiler about where function arguments will
16be found on entry to a function. A "calling convention" also specifies
17where the return value for a function is found.
18
19Some programs may not know at the time of compilation what arguments
20are to be passed to a function. For instance, an interpreter may be
21told at run-time about the number and types of arguments used to call
22a given function. Libffi can be used in such programs to provide a
23bridge from the interpreter program to compiled code.
24
25The libffi library provides a portable, high level programming
26interface to various calling conventions. This allows a programmer to
27call any function specified by a call interface description at run
28time.
29
30FFI stands for Foreign Function Interface. A foreign function
31interface is the popular name for the interface that allows code
32written in one language to call code written in another language. The
33libffi library really only provides the lowest, machine dependent
34layer of a fully featured foreign function interface. A layer must
35exist above libffi that handles type conversions for values passed
36between the two languages.
37
38
39Supported Platforms
40===================
41
Anthony Green0cfe60e2009-12-29 10:06:04 -050042Libffi has been ported to many different platforms.
43For specific configuration details and testing status, please
44refer to the wiki page here:
Anthony Greenc6dddbd2009-10-04 08:11:33 -040045
Anthony Green0cfe60e2009-12-29 10:06:04 -050046 http://www.moxielogic.org/wiki/index.php?title=Libffi_3.0.9
47
48At the time of release, the following basic configurations have been
49tested:
50
51|--------------+------------------|
52| Architecture | Operating System |
53|--------------+------------------|
54| Alpha | Linux |
55| ARM | Linux |
56| AVR32 | Linux |
57| HPPA | HPUX |
58| IA-64 | Linux |
59| MIPS | IRIX |
60| MIPS | Linux |
61| MIPS64 | Linux |
62| PowerPC | Linux |
63| PowerPC | Mac OSX |
64| PowerPC | FreeBSD |
65| PowerPC64 | Linux |
66| S390 | Linux |
67| S390X | Linux |
68| SPARC | Linux |
69| SPARC | Solaris |
70| SPARC64 | Linux |
71| SPARC64 | FreeBSD |
72| X86 | FreeBSD |
73| X86 | kFreeBSD |
74| X86 | Linux |
75| X86 | Mac OSX |
76| X86 | OpenBSD |
77| X86 | Solaris |
78| X86 | Windows/Cygwin |
79| X86 | Windows/MingW |
80| X86-64 | FreeBSD |
81| X86-64 | Linux |
82| X86-64 | OpenBSD |
83|--------------+------------------|
Anthony Greenc6dddbd2009-10-04 08:11:33 -040084
85Please send additional platform test results to
Anthony Green0cfe60e2009-12-29 10:06:04 -050086libffi-discuss@sourceware.org and feel free to update the wiki page
87above.
Anthony Greenc6dddbd2009-10-04 08:11:33 -040088
89Installing libffi
90=================
91
Anthony Greenc6dddbd2009-10-04 08:11:33 -040092First you must configure the distribution for your particular
93system. Go to the directory you wish to build libffi in and run the
94"configure" program found in the root directory of the libffi source
95distribution.
96
97You may want to tell configure where to install the libffi library and
98header files. To do that, use the --prefix configure switch. Libffi
99will install under /usr/local by default.
100
101If you want to enable extra run-time debugging checks use the the
102--enable-debug configure switch. This is useful when your program dies
103mysteriously while using libffi.
104
105Another useful configure switch is --enable-purify-safety. Using this
106will add some extra code which will suppress certain warnings when you
107are using Purify with libffi. Only use this switch when using
108Purify, as it will slow down the library.
109
110Configure has many other options. Use "configure --help" to see them all.
111
112Once configure has finished, type "make". Note that you must be using
113GNU make. You can ftp GNU make from prep.ai.mit.edu:/pub/gnu.
114
115To ensure that libffi is working as advertised, type "make check".
116This will require that you have DejaGNU installed.
117
118To install the library and header files, type "make install".
119
120
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400121History
122=======
123
Anthony Greenf7c0bc62009-12-25 01:22:11 -0500124See the ChangeLog files for details.
125
1263.0.9 Dec-xx-09
127 Add AVR32 and win64 ports. Add ARM softfp support.
128 Many fixes for AIX, Solaris, HP-UX, *BSD.
129 Fix x86-64 closure bug.
Anthony Green0cfe60e2009-12-29 10:06:04 -0500130 Build DLL for windows.
Anthony Greenf7c0bc62009-12-25 01:22:11 -0500131
1323.0.8 Dec-19-08
133 Add *BSD, BeOS, and PA-Linux support.
134
Anthony Greenc6dddbd2009-10-04 08:11:33 -04001353.0.7 Nov-11-08
136 Fix for ppc FreeBSD.
137 (thanks to Andreas Tobler)
138
1393.0.6 Jul-17-08
140 Fix for closures on sh.
141 Mark the sh/sh64 stack as non-executable.
142 (both thanks to Kaz Kojima)
143
1443.0.5 Apr-3-08
145 Fix libffi.pc file.
146 Fix #define ARM for IcedTea users.
147 Fix x86 closure bug.
148
1493.0.4 Feb-24-08
150 Fix x86 OpenBSD configury.
151
1523.0.3 Feb-22-08
153 Enable x86 OpenBSD thanks to Thomas Heller, and
154 x86-64 FreeBSD thanks to Björn König and Andreas Tobler.
155 Clean up test instruction in README.
156
1573.0.2 Feb-21-08
158 Improved x86 FreeBSD support.
159 Thanks to Björn König.
160
1613.0.1 Feb-15-08
162 Fix instruction cache flushing bug on MIPS.
163 Thanks to David Daney.
164
1653.0.0 Feb-15-08
166 Many changes, mostly thanks to the GCC project.
167 Cygnus Solutions is now Red Hat.
168
169 [10 years go by...]
170
1711.20 Oct-5-98
172 Raffaele Sena produces ARM port.
173
1741.19 Oct-5-98
175 Fixed x86 long double and long long return support.
176 m68k bug fixes from Andreas Schwab.
177 Patch for DU assembler compatibility for the Alpha from Richard
178 Henderson.
179
1801.18 Apr-17-98
181 Bug fixes and MIPS configuration changes.
182
1831.17 Feb-24-98
184 Bug fixes and m68k port from Andreas Schwab. PowerPC port from
185 Geoffrey Keating. Various bug x86, Sparc and MIPS bug fixes.
186
1871.16 Feb-11-98
188 Richard Henderson produces Alpha port.
189
1901.15 Dec-4-97
191 Fixed an n32 ABI bug. New libtool, auto* support.
192
1931.14 May-13-97
194 libtool is now used to generate shared and static libraries.
195 Fixed a minor portability problem reported by Russ McManus
196 <mcmanr@eq.gs.com>.
197
1981.13 Dec-2-96
199 Added --enable-purify-safety to keep Purify from complaining
200 about certain low level code.
201 Sparc fix for calling functions with < 6 args.
202 Linux x86 a.out fix.
203
2041.12 Nov-22-96
205 Added missing ffi_type_void, needed for supporting void return
206 types. Fixed test case for non MIPS machines. Cygnus Support
207 is now Cygnus Solutions.
208
2091.11 Oct-30-96
210 Added notes about GNU make.
211
2121.10 Oct-29-96
213 Added configuration fix for non GNU compilers.
214
2151.09 Oct-29-96
216 Added --enable-debug configure switch. Clean-ups based on LCLint
217 feedback. ffi_mips.h is always installed. Many configuration
218 fixes. Fixed ffitest.c for sparc builds.
219
2201.08 Oct-15-96
221 Fixed n32 problem. Many clean-ups.
222
2231.07 Oct-14-96
224 Gordon Irlam rewrites v8.S again. Bug fixes.
225
2261.06 Oct-14-96
227 Gordon Irlam improved the sparc port.
228
2291.05 Oct-14-96
230 Interface changes based on feedback.
231
2321.04 Oct-11-96
233 Sparc port complete (modulo struct passing bug).
234
2351.03 Oct-10-96
236 Passing struct args, and returning struct values works for
237 all architectures/calling conventions. Expanded tests.
238
2391.02 Oct-9-96
240 Added SGI n32 support. Fixed bugs in both o32 and Linux support.
241 Added "make test".
242
2431.01 Oct-8-96
244 Fixed float passing bug in mips version. Restructured some
245 of the code. Builds cleanly with SGI tools.
246
2471.00 Oct-7-96
248 First release. No public announcement.
249
250
251Authors & Credits
252=================
253
Anthony Greenda11bec2009-12-24 05:34:46 -0500254libffi was originally written by Anthony Green <green@redhat.com>.
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400255
256The developers of the GNU Compiler Collection project have made
257innumerable valuable contributions. See the ChangeLog file for
258details.
259
260Some of the ideas behind libffi were inspired by Gianni Mariani's free
261gencall library for Silicon Graphics machines.
262
263The closure mechanism was designed and implemented by Kresten Krab
264Thorup.
265
266Major processor architecture ports were contributed by the following
267developers:
268
269alpha Richard Henderson
270arm Raffaele Sena
271cris Simon Posnjak, Hans-Peter Nilsson
272frv Anthony Green
273ia64 Hans Boehm
274m32r Kazuhiro Inaoka
275m68k Andreas Schwab
276mips Anthony Green, Casey Marshall
277mips64 David Daney
278pa Randolph Chung, Dave Anglin, Andreas Tobler
279powerpc Geoffrey Keating, Andreas Tobler,
280 David Edelsohn, John Hornkvist
281powerpc64 Jakub Jelinek
282s390 Gerhard Tonn, Ulrich Weigand
283sh Kaz Kojima
284sh64 Kaz Kojima
285sparc Anthony Green, Gordon Irlam
286x86 Anthony Green, Jon Beniston
287x86-64 Bo Thorsen
288
289Jesper Skov and Andrew Haley both did more than their fair share of
290stepping through the code and tracking down bugs.
291
292Thanks also to Tom Tromey for bug fixes, documentation and
293configuration help.
294
295Thanks to Jim Blandy, who provided some useful feedback on the libffi
296interface.
297
298Andreas Tobler has done a tremendous amount of work on the testsuite.
299
300Alex Oliva solved the executable page problem for SElinux.
301
302The list above is almost certainly incomplete and inaccurate. I'm
303happy to make corrections or additions upon request.
304
305If you have a problem, or have found a bug, please send a note to
306green@redhat.com.