blob: 1da4e89c73675407f65d38bf37f76fd9c6d2cc8d [file] [log] [blame]
Anthony Greenc6dddbd2009-10-04 08:11:33 -04001Status
2======
3
Anthony Greenee6696f2011-08-23 12:30:29 -04004libffi-3.0.11 was released on *****************. 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 Greenee6696f2011-08-23 12:30:29 -040046 http://www.moxielogic.org/wiki/index.php?title=Libffi_3.0.11
Anthony Green0cfe60e2009-12-29 10:06:04 -050047
48At the time of release, the following basic configurations have been
49tested:
50
51|--------------+------------------|
52| Architecture | Operating System |
53|--------------+------------------|
54| Alpha | Linux |
Anthony Green7b7a42f2010-01-12 09:14:14 -050055| Alpha | Tru64 |
Anthony Green0cfe60e2009-12-29 10:06:04 -050056| ARM | Linux |
Anthony Greene2214f82011-02-08 19:22:56 -050057| ARM | iOS |
Anthony Green0cfe60e2009-12-29 10:06:04 -050058| AVR32 | Linux |
59| HPPA | HPUX |
60| IA-64 | Linux |
Anthony Green630b9c02011-02-09 06:24:23 -050061| M68K | RTEMS |
Anthony Green0cfe60e2009-12-29 10:06:04 -050062| MIPS | IRIX |
63| MIPS | Linux |
Anthony Green630b9c02011-02-09 06:24:23 -050064| MIPS | RTEMS |
Anthony Green0cfe60e2009-12-29 10:06:04 -050065| MIPS64 | Linux |
Anthony Greenafaf3382012-01-23 14:17:13 -050066| PowerPC | AMIGA |
Anthony Green0cfe60e2009-12-29 10:06:04 -050067| PowerPC | Linux |
68| PowerPC | Mac OSX |
69| PowerPC | FreeBSD |
70| PowerPC64 | Linux |
71| S390 | Linux |
72| S390X | Linux |
73| SPARC | Linux |
74| SPARC | Solaris |
75| SPARC64 | Linux |
76| SPARC64 | FreeBSD |
77| X86 | FreeBSD |
Anthony Green747d6c32011-02-09 14:56:23 -050078| X86 | Interix |
Anthony Green0cfe60e2009-12-29 10:06:04 -050079| X86 | kFreeBSD |
80| X86 | Linux |
Anthony Green964c5b92012-03-03 14:46:20 -050081| X86 | Linux/x32 |
Anthony Green0cfe60e2009-12-29 10:06:04 -050082| X86 | Mac OSX |
83| X86 | OpenBSD |
Anthony Greenf2c2a4f2010-04-13 10:19:28 -040084| X86 | OS/2 |
Anthony Green0cfe60e2009-12-29 10:06:04 -050085| X86 | Solaris |
86| X86 | Windows/Cygwin |
87| X86 | Windows/MingW |
88| X86-64 | FreeBSD |
89| X86-64 | Linux |
90| X86-64 | OpenBSD |
Anthony Green4b18d1f2010-01-01 10:24:27 -050091| X86-64 | Windows/MingW |
Anthony Green0cfe60e2009-12-29 10:06:04 -050092|--------------+------------------|
Anthony Green2e7e03d2009-12-31 07:43:22 -050093
Anthony Greenc6dddbd2009-10-04 08:11:33 -040094Please send additional platform test results to
Anthony Green0cfe60e2009-12-29 10:06:04 -050095libffi-discuss@sourceware.org and feel free to update the wiki page
96above.
Anthony Greenc6dddbd2009-10-04 08:11:33 -040097
98Installing libffi
99=================
100
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400101First you must configure the distribution for your particular
102system. Go to the directory you wish to build libffi in and run the
103"configure" program found in the root directory of the libffi source
104distribution.
105
106You may want to tell configure where to install the libffi library and
107header files. To do that, use the --prefix configure switch. Libffi
108will install under /usr/local by default.
109
110If you want to enable extra run-time debugging checks use the the
111--enable-debug configure switch. This is useful when your program dies
112mysteriously while using libffi.
113
114Another useful configure switch is --enable-purify-safety. Using this
115will add some extra code which will suppress certain warnings when you
116are using Purify with libffi. Only use this switch when using
117Purify, as it will slow down the library.
118
Anthony Greenff3cd682010-01-15 11:27:24 -0500119It's also possible to build libffi on Windows platforms with
120Microsoft's Visual C++ compiler. In this case, use the msvcc.sh
121wrapper script during configuration like so:
122
Anthony Green9dc9a292010-04-13 10:33:52 -0400123path/to/configure CC=path/to/msvcc.sh LD=link CPP=\"cl -nologo -EP\"
124
125For 64-bit Windows builds, use CC="path/to/msvcc.sh -m64".
126You may also need to specify --build appropriately. When building with MSVC
127under a MingW environment, you may need to remove the line in configure
128that sets 'fix_srcfile_path' to a 'cygpath' command. ('cygpath' is not
129present in MingW, and is not required when using MingW-style paths.)
Anthony Greenff3cd682010-01-15 11:27:24 -0500130
Anthony Greenf4983182011-02-09 06:26:46 -0500131For iOS builds, refer to the build-ios.sh script for guidance.
132
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400133Configure has many other options. Use "configure --help" to see them all.
134
135Once configure has finished, type "make". Note that you must be using
136GNU make. You can ftp GNU make from prep.ai.mit.edu:/pub/gnu.
137
138To ensure that libffi is working as advertised, type "make check".
139This will require that you have DejaGNU installed.
140
141To install the library and header files, type "make install".
142
143
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400144History
145=======
146
Anthony Greenf7c0bc62009-12-25 01:22:11 -0500147See the ChangeLog files for details.
148
Anthony Greenee6696f2011-08-23 12:30:29 -04001493.0.11 MMM-DD-YY
Anthony Greenafaf3382012-01-23 14:17:13 -0500150 Lots of build fixes.
151 Add Amiga newer MacOS support.
Anthony Green964c5b92012-03-03 14:46:20 -0500152 Add Linux/x32 support.
153 Add thiscall and fastcall support on Windows.
Anthony Greenafaf3382012-01-23 14:17:13 -0500154 Fix Octeon and MC68881 support.
155 Fix code pessimizations.
Anthony Greenee6696f2011-08-23 12:30:29 -0400156
Anthony Greenc6265c32011-08-23 10:31:33 -04001573.0.10 Aug-23-11
Anthony Greencbb062c2011-02-17 20:39:21 -0500158 Add support for Apple's iOS.
Anthony Green1fbf9dc2011-02-13 08:06:39 -0500159 Add support for ARM VFP ABI.
Anthony Green630b9c02011-02-09 06:24:23 -0500160 Add RTEMS support for MIPS and M68K.
Anthony Greenc6265c32011-08-23 10:31:33 -0400161 Fix instruction cache clearing problems on
162 ARM and SPARC.
Anthony Green2db72612010-11-21 10:50:56 -0500163 Fix the N64 build on mips-sgi-irix6.5.
Anthony Greencbb062c2011-02-17 20:39:21 -0500164 Enable builds with Microsoft's compiler.
165 Enable x86 builds with Oracle's Solaris compiler.
Anthony Greene2214f82011-02-08 19:22:56 -0500166 Fix support for calling code compiled with Oracle's Sparc
Anthony Greencbb062c2011-02-17 20:39:21 -0500167 Solaris compiler.
168 Testsuite fixes for Tru64 Unix.
Anthony Greenc6265c32011-08-23 10:31:33 -0400169 Additional platform support.
Anthony Green2db72612010-11-21 10:50:56 -0500170
Anthony Green2e7e03d2009-12-31 07:43:22 -05001713.0.9 Dec-31-09
Anthony Greenf7c0bc62009-12-25 01:22:11 -0500172 Add AVR32 and win64 ports. Add ARM softfp support.
173 Many fixes for AIX, Solaris, HP-UX, *BSD.
Anthony Green2e7e03d2009-12-31 07:43:22 -0500174 Several PowerPC and x86-64 bug fixes.
Anthony Green0cfe60e2009-12-29 10:06:04 -0500175 Build DLL for windows.
Anthony Greenf7c0bc62009-12-25 01:22:11 -0500176
1773.0.8 Dec-19-08
178 Add *BSD, BeOS, and PA-Linux support.
179
Anthony Greenc6dddbd2009-10-04 08:11:33 -04001803.0.7 Nov-11-08
181 Fix for ppc FreeBSD.
182 (thanks to Andreas Tobler)
183
1843.0.6 Jul-17-08
185 Fix for closures on sh.
186 Mark the sh/sh64 stack as non-executable.
187 (both thanks to Kaz Kojima)
188
1893.0.5 Apr-3-08
190 Fix libffi.pc file.
191 Fix #define ARM for IcedTea users.
192 Fix x86 closure bug.
193
1943.0.4 Feb-24-08
195 Fix x86 OpenBSD configury.
196
1973.0.3 Feb-22-08
198 Enable x86 OpenBSD thanks to Thomas Heller, and
199 x86-64 FreeBSD thanks to Björn König and Andreas Tobler.
200 Clean up test instruction in README.
201
2023.0.2 Feb-21-08
203 Improved x86 FreeBSD support.
204 Thanks to Björn König.
205
2063.0.1 Feb-15-08
207 Fix instruction cache flushing bug on MIPS.
208 Thanks to David Daney.
209
2103.0.0 Feb-15-08
211 Many changes, mostly thanks to the GCC project.
212 Cygnus Solutions is now Red Hat.
213
214 [10 years go by...]
215
2161.20 Oct-5-98
217 Raffaele Sena produces ARM port.
218
2191.19 Oct-5-98
220 Fixed x86 long double and long long return support.
221 m68k bug fixes from Andreas Schwab.
222 Patch for DU assembler compatibility for the Alpha from Richard
223 Henderson.
224
2251.18 Apr-17-98
226 Bug fixes and MIPS configuration changes.
227
2281.17 Feb-24-98
229 Bug fixes and m68k port from Andreas Schwab. PowerPC port from
230 Geoffrey Keating. Various bug x86, Sparc and MIPS bug fixes.
231
2321.16 Feb-11-98
233 Richard Henderson produces Alpha port.
234
2351.15 Dec-4-97
236 Fixed an n32 ABI bug. New libtool, auto* support.
237
2381.14 May-13-97
239 libtool is now used to generate shared and static libraries.
240 Fixed a minor portability problem reported by Russ McManus
241 <mcmanr@eq.gs.com>.
242
2431.13 Dec-2-96
244 Added --enable-purify-safety to keep Purify from complaining
245 about certain low level code.
246 Sparc fix for calling functions with < 6 args.
247 Linux x86 a.out fix.
248
2491.12 Nov-22-96
250 Added missing ffi_type_void, needed for supporting void return
251 types. Fixed test case for non MIPS machines. Cygnus Support
252 is now Cygnus Solutions.
253
2541.11 Oct-30-96
255 Added notes about GNU make.
256
2571.10 Oct-29-96
258 Added configuration fix for non GNU compilers.
259
2601.09 Oct-29-96
261 Added --enable-debug configure switch. Clean-ups based on LCLint
262 feedback. ffi_mips.h is always installed. Many configuration
263 fixes. Fixed ffitest.c for sparc builds.
264
2651.08 Oct-15-96
266 Fixed n32 problem. Many clean-ups.
267
2681.07 Oct-14-96
269 Gordon Irlam rewrites v8.S again. Bug fixes.
270
2711.06 Oct-14-96
272 Gordon Irlam improved the sparc port.
273
2741.05 Oct-14-96
275 Interface changes based on feedback.
276
2771.04 Oct-11-96
278 Sparc port complete (modulo struct passing bug).
279
2801.03 Oct-10-96
281 Passing struct args, and returning struct values works for
282 all architectures/calling conventions. Expanded tests.
283
2841.02 Oct-9-96
285 Added SGI n32 support. Fixed bugs in both o32 and Linux support.
286 Added "make test".
287
2881.01 Oct-8-96
289 Fixed float passing bug in mips version. Restructured some
290 of the code. Builds cleanly with SGI tools.
291
2921.00 Oct-7-96
293 First release. No public announcement.
294
295
296Authors & Credits
297=================
298
Anthony Greenda11bec2009-12-24 05:34:46 -0500299libffi was originally written by Anthony Green <green@redhat.com>.
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400300
301The developers of the GNU Compiler Collection project have made
302innumerable valuable contributions. See the ChangeLog file for
303details.
304
305Some of the ideas behind libffi were inspired by Gianni Mariani's free
306gencall library for Silicon Graphics machines.
307
308The closure mechanism was designed and implemented by Kresten Krab
309Thorup.
310
311Major processor architecture ports were contributed by the following
312developers:
313
314alpha Richard Henderson
315arm Raffaele Sena
316cris Simon Posnjak, Hans-Peter Nilsson
317frv Anthony Green
318ia64 Hans Boehm
319m32r Kazuhiro Inaoka
320m68k Andreas Schwab
321mips Anthony Green, Casey Marshall
322mips64 David Daney
323pa Randolph Chung, Dave Anglin, Andreas Tobler
324powerpc Geoffrey Keating, Andreas Tobler,
325 David Edelsohn, John Hornkvist
326powerpc64 Jakub Jelinek
327s390 Gerhard Tonn, Ulrich Weigand
328sh Kaz Kojima
329sh64 Kaz Kojima
330sparc Anthony Green, Gordon Irlam
331x86 Anthony Green, Jon Beniston
332x86-64 Bo Thorsen
333
334Jesper Skov and Andrew Haley both did more than their fair share of
335stepping through the code and tracking down bugs.
336
337Thanks also to Tom Tromey for bug fixes, documentation and
338configuration help.
339
340Thanks to Jim Blandy, who provided some useful feedback on the libffi
341interface.
342
343Andreas Tobler has done a tremendous amount of work on the testsuite.
344
345Alex Oliva solved the executable page problem for SElinux.
346
347The list above is almost certainly incomplete and inaccurate. I'm
348happy to make corrections or additions upon request.
349
Anthony Green630b9c02011-02-09 06:24:23 -0500350If you have a problem, or have found a bug, please send a note to the
351author at green@moxielogic.com, or the project mailing list at
352libffi-discuss@sourceware.org.