Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 362 lines (281 sloc) 11.352 kb
c6dddbd @atgreen Initial commit
authored
1 Status
2 ======
3
09b23cf @atgreen Update README with Blackfin/uClinux support
authored
4 libffi-3.0.XX was released on XXXXXXX. Check the libffi web page for
5 updates: <URL:http://sourceware.org/libffi/>.
c6dddbd @atgreen Initial commit
authored
6
7
8 What is libffi?
9 ===============
10
11 Compilers for high level languages generate code that follow certain
12 conventions. These conventions are necessary, in part, for separate
13 compilation to work. One such convention is the "calling
14 convention". The "calling convention" is essentially a set of
15 assumptions made by the compiler about where function arguments will
16 be found on entry to a function. A "calling convention" also specifies
17 where the return value for a function is found.
18
19 Some programs may not know at the time of compilation what arguments
20 are to be passed to a function. For instance, an interpreter may be
21 told at run-time about the number and types of arguments used to call
22 a given function. Libffi can be used in such programs to provide a
23 bridge from the interpreter program to compiled code.
24
25 The libffi library provides a portable, high level programming
26 interface to various calling conventions. This allows a programmer to
27 call any function specified by a call interface description at run
28 time.
29
30 FFI stands for Foreign Function Interface. A foreign function
31 interface is the popular name for the interface that allows code
32 written in one language to call code written in another language. The
33 libffi library really only provides the lowest, machine dependent
34 layer of a fully featured foreign function interface. A layer must
35 exist above libffi that handles type conversions for values passed
36 between the two languages.
37
38
39 Supported Platforms
40 ===================
41
0cfe60e 3.0.9rc12
Anthony Green authored
42 Libffi has been ported to many different platforms.
43 For specific configuration details and testing status, please
44 refer to the wiki page here:
45
ee6696f @atgreen 3.0.11-rc1. soname bump.
authored
46 http://www.moxielogic.org/wiki/index.php?title=Libffi_3.0.11
0cfe60e 3.0.9rc12
Anthony Green authored
47
48 At the time of release, the following basic configurations have been
49 tested:
50
51 |--------------+------------------|
52 | Architecture | Operating System |
53 |--------------+------------------|
54 | Alpha | Linux |
7b7a42f Rebase from GCC
Anthony Green authored
55 | Alpha | Tru64 |
0cfe60e 3.0.9rc12
Anthony Green authored
56 | ARM | Linux |
e2214f8 @atgreen Update README
authored
57 | ARM | iOS |
0cfe60e 3.0.9rc12
Anthony Green authored
58 | AVR32 | Linux |
09b23cf @atgreen Update README with Blackfin/uClinux support
authored
59 | Blackfin | uClinux |
0cfe60e 3.0.9rc12
Anthony Green authored
60 | HPPA | HPUX |
61 | IA-64 | Linux |
bd78c9c @atgreen More cygwin fixes
authored
62 | M68K | FreeMiNT |
630b9c0 @atgreen Update to rc2
authored
63 | M68K | RTEMS |
0cfe60e 3.0.9rc12
Anthony Green authored
64 | MIPS | IRIX |
65 | MIPS | Linux |
630b9c0 @atgreen Update to rc2
authored
66 | MIPS | RTEMS |
0cfe60e 3.0.9rc12
Anthony Green authored
67 | MIPS64 | Linux |
afaf338 @atgreen mend
authored
68 | PowerPC | AMIGA |
0cfe60e 3.0.9rc12
Anthony Green authored
69 | PowerPC | Linux |
70 | PowerPC | Mac OSX |
71 | PowerPC | FreeBSD |
72 | PowerPC64 | Linux |
73 | S390 | Linux |
74 | S390X | Linux |
75 | SPARC | Linux |
76 | SPARC | Solaris |
77 | SPARC64 | Linux |
78 | SPARC64 | FreeBSD |
79 | X86 | FreeBSD |
747d6c3 @atgreen Add Interix support
authored
80 | X86 | Interix |
0cfe60e 3.0.9rc12
Anthony Green authored
81 | X86 | kFreeBSD |
82 | X86 | Linux |
83 | X86 | Mac OSX |
84 | X86 | OpenBSD |
f2c2a4f Remove warnings and add OS/2 support
Anthony Green authored
85 | X86 | OS/2 |
0cfe60e 3.0.9rc12
Anthony Green authored
86 | X86 | Solaris |
87 | X86 | Windows/Cygwin |
88 | X86 | Windows/MingW |
89 | X86-64 | FreeBSD |
90 | X86-64 | Linux |
9bcc884 @atgreen Fix Linux/x32 reference in README
authored
91 | X86-64 | Linux/x32 |
0cfe60e 3.0.9rc12
Anthony Green authored
92 | X86-64 | OpenBSD |
4b18d1f Add x86-64 MingW to README
Anthony Green authored
93 | X86-64 | Windows/MingW |
0cfe60e 3.0.9rc12
Anthony Green authored
94 |--------------+------------------|
2e7e03d Final updates before 3.0.9
Anthony Green authored
95
c6dddbd @atgreen Initial commit
authored
96 Please send additional platform test results to
0cfe60e 3.0.9rc12
Anthony Green authored
97 libffi-discuss@sourceware.org and feel free to update the wiki page
98 above.
c6dddbd @atgreen Initial commit
authored
99
100 Installing libffi
101 =================
102
103 First you must configure the distribution for your particular
104 system. Go to the directory you wish to build libffi in and run the
105 "configure" program found in the root directory of the libffi source
106 distribution.
107
108 You may want to tell configure where to install the libffi library and
109 header files. To do that, use the --prefix configure switch. Libffi
110 will install under /usr/local by default.
111
112 If you want to enable extra run-time debugging checks use the the
113 --enable-debug configure switch. This is useful when your program dies
114 mysteriously while using libffi.
115
116 Another useful configure switch is --enable-purify-safety. Using this
117 will add some extra code which will suppress certain warnings when you
118 are using Purify with libffi. Only use this switch when using
119 Purify, as it will slow down the library.
120
ff3cd68 Add msvc.sh wrapper
Anthony Green authored
121 It's also possible to build libffi on Windows platforms with
122 Microsoft's Visual C++ compiler. In this case, use the msvcc.sh
123 wrapper script during configuration like so:
124
9dc9a29 Rebase to latest GCC sources
Anthony Green authored
125 path/to/configure CC=path/to/msvcc.sh LD=link CPP=\"cl -nologo -EP\"
126
127 For 64-bit Windows builds, use CC="path/to/msvcc.sh -m64".
128 You may also need to specify --build appropriately. When building with MSVC
129 under a MingW environment, you may need to remove the line in configure
130 that sets 'fix_srcfile_path' to a 'cygpath' command. ('cygpath' is not
131 present in MingW, and is not required when using MingW-style paths.)
ff3cd68 Add msvc.sh wrapper
Anthony Green authored
132
ebb8e89 @mikelikespie Build iOS library with xcode
mikelikespie authored
133 For iOS builds, run generate-ios-source-and-headers.py and then
134 libffi.xcodeproj should work.
f498318 @atgreen Update README for iOS again
authored
135
c6dddbd @atgreen Initial commit
authored
136 Configure has many other options. Use "configure --help" to see them all.
137
138 Once configure has finished, type "make". Note that you must be using
139 GNU make. You can ftp GNU make from prep.ai.mit.edu:/pub/gnu.
140
141 To ensure that libffi is working as advertised, type "make check".
142 This will require that you have DejaGNU installed.
143
144 To install the library and header files, type "make install".
145
146
147 History
148 =======
149
f7c0bc6 3.0.9rc6
Anthony Green authored
150 See the ChangeLog files for details.
151
09b23cf @atgreen Update README with Blackfin/uClinux support
authored
152 3.0.12 XXX-XX-XX
153 Add Blackfin support.
154
ff3d76f @atgreen 3.0.11
authored
155 3.0.11 Apr-11-12
59bb61a @atgreen Update libtool version, README, tests dists
authored
156 Add support for variadic functions (ffi_prep_cif_var).
964c5b9 @atgreen abi check fixes and Linux/x32 support
authored
157 Add Linux/x32 support.
59bb61a @atgreen Update libtool version, README, tests dists
authored
158 Add thiscall, fastcall and MSVC cdecl support on Windows.
159 Add Amiga and newer MacOS support.
160 Add m68k FreeMiNT support.
ebb8e89 @mikelikespie Build iOS library with xcode
mikelikespie authored
161 Integration with iOS' xcode build tools.
162 Fix Octeon and MC68881 support.
afaf338 @atgreen mend
authored
163 Fix code pessimizations.
59bb61a @atgreen Update libtool version, README, tests dists
authored
164 Lots of build fixes.
ee6696f @atgreen 3.0.11-rc1. soname bump.
authored
165
c6265c3 @atgreen Version 3.0.10
authored
166 3.0.10 Aug-23-11
cbb062c @atgreen Another non-GCC configury fix
authored
167 Add support for Apple's iOS.
1fbf9dc @atgreen Fix bad_abi test. rc5.
authored
168 Add support for ARM VFP ABI.
630b9c0 @atgreen Update to rc2
authored
169 Add RTEMS support for MIPS and M68K.
c6265c3 @atgreen Version 3.0.10
authored
170 Fix instruction cache clearing problems on
171 ARM and SPARC.
2db7261 @atgreen Rebase
authored
172 Fix the N64 build on mips-sgi-irix6.5.
cbb062c @atgreen Another non-GCC configury fix
authored
173 Enable builds with Microsoft's compiler.
174 Enable x86 builds with Oracle's Solaris compiler.
e2214f8 @atgreen Update README
authored
175 Fix support for calling code compiled with Oracle's Sparc
cbb062c @atgreen Another non-GCC configury fix
authored
176 Solaris compiler.
177 Testsuite fixes for Tru64 Unix.
c6265c3 @atgreen Version 3.0.10
authored
178 Additional platform support.
2db7261 @atgreen Rebase
authored
179
2e7e03d Final updates before 3.0.9
Anthony Green authored
180 3.0.9 Dec-31-09
f7c0bc6 3.0.9rc6
Anthony Green authored
181 Add AVR32 and win64 ports. Add ARM softfp support.
182 Many fixes for AIX, Solaris, HP-UX, *BSD.
2e7e03d Final updates before 3.0.9
Anthony Green authored
183 Several PowerPC and x86-64 bug fixes.
0cfe60e 3.0.9rc12
Anthony Green authored
184 Build DLL for windows.
f7c0bc6 3.0.9rc6
Anthony Green authored
185
186 3.0.8 Dec-19-08
187 Add *BSD, BeOS, and PA-Linux support.
188
c6dddbd @atgreen Initial commit
authored
189 3.0.7 Nov-11-08
190 Fix for ppc FreeBSD.
191 (thanks to Andreas Tobler)
192
193 3.0.6 Jul-17-08
194 Fix for closures on sh.
195 Mark the sh/sh64 stack as non-executable.
196 (both thanks to Kaz Kojima)
197
198 3.0.5 Apr-3-08
199 Fix libffi.pc file.
200 Fix #define ARM for IcedTea users.
201 Fix x86 closure bug.
202
203 3.0.4 Feb-24-08
204 Fix x86 OpenBSD configury.
205
206 3.0.3 Feb-22-08
207 Enable x86 OpenBSD thanks to Thomas Heller, and
208 x86-64 FreeBSD thanks to Björn König and Andreas Tobler.
209 Clean up test instruction in README.
210
211 3.0.2 Feb-21-08
212 Improved x86 FreeBSD support.
213 Thanks to Björn König.
214
215 3.0.1 Feb-15-08
216 Fix instruction cache flushing bug on MIPS.
217 Thanks to David Daney.
218
219 3.0.0 Feb-15-08
220 Many changes, mostly thanks to the GCC project.
221 Cygnus Solutions is now Red Hat.
222
223 [10 years go by...]
224
225 1.20 Oct-5-98
226 Raffaele Sena produces ARM port.
227
228 1.19 Oct-5-98
229 Fixed x86 long double and long long return support.
230 m68k bug fixes from Andreas Schwab.
231 Patch for DU assembler compatibility for the Alpha from Richard
232 Henderson.
233
234 1.18 Apr-17-98
235 Bug fixes and MIPS configuration changes.
236
237 1.17 Feb-24-98
238 Bug fixes and m68k port from Andreas Schwab. PowerPC port from
239 Geoffrey Keating. Various bug x86, Sparc and MIPS bug fixes.
240
241 1.16 Feb-11-98
242 Richard Henderson produces Alpha port.
243
244 1.15 Dec-4-97
245 Fixed an n32 ABI bug. New libtool, auto* support.
246
247 1.14 May-13-97
248 libtool is now used to generate shared and static libraries.
249 Fixed a minor portability problem reported by Russ McManus
250 <mcmanr@eq.gs.com>.
251
252 1.13 Dec-2-96
253 Added --enable-purify-safety to keep Purify from complaining
254 about certain low level code.
255 Sparc fix for calling functions with < 6 args.
256 Linux x86 a.out fix.
257
258 1.12 Nov-22-96
259 Added missing ffi_type_void, needed for supporting void return
260 types. Fixed test case for non MIPS machines. Cygnus Support
261 is now Cygnus Solutions.
262
263 1.11 Oct-30-96
264 Added notes about GNU make.
265
266 1.10 Oct-29-96
267 Added configuration fix for non GNU compilers.
268
269 1.09 Oct-29-96
270 Added --enable-debug configure switch. Clean-ups based on LCLint
271 feedback. ffi_mips.h is always installed. Many configuration
272 fixes. Fixed ffitest.c for sparc builds.
273
274 1.08 Oct-15-96
275 Fixed n32 problem. Many clean-ups.
276
277 1.07 Oct-14-96
278 Gordon Irlam rewrites v8.S again. Bug fixes.
279
280 1.06 Oct-14-96
281 Gordon Irlam improved the sparc port.
282
283 1.05 Oct-14-96
284 Interface changes based on feedback.
285
286 1.04 Oct-11-96
287 Sparc port complete (modulo struct passing bug).
288
289 1.03 Oct-10-96
290 Passing struct args, and returning struct values works for
291 all architectures/calling conventions. Expanded tests.
292
293 1.02 Oct-9-96
294 Added SGI n32 support. Fixed bugs in both o32 and Linux support.
295 Added "make test".
296
297 1.01 Oct-8-96
298 Fixed float passing bug in mips version. Restructured some
299 of the code. Builds cleanly with SGI tools.
300
301 1.00 Oct-7-96
302 First release. No public announcement.
303
304
305 Authors & Credits
306 =================
307
ff3d76f @atgreen 3.0.11
authored
308 libffi was originally written by Anthony Green <green@moxielogic.com>.
c6dddbd @atgreen Initial commit
authored
309
310 The developers of the GNU Compiler Collection project have made
311 innumerable valuable contributions. See the ChangeLog file for
312 details.
313
314 Some of the ideas behind libffi were inspired by Gianni Mariani's free
315 gencall library for Silicon Graphics machines.
316
317 The closure mechanism was designed and implemented by Kresten Krab
318 Thorup.
319
320 Major processor architecture ports were contributed by the following
321 developers:
322
323 alpha Richard Henderson
324 arm Raffaele Sena
325 cris Simon Posnjak, Hans-Peter Nilsson
326 frv Anthony Green
327 ia64 Hans Boehm
328 m32r Kazuhiro Inaoka
329 m68k Andreas Schwab
330 mips Anthony Green, Casey Marshall
331 mips64 David Daney
332 pa Randolph Chung, Dave Anglin, Andreas Tobler
333 powerpc Geoffrey Keating, Andreas Tobler,
334 David Edelsohn, John Hornkvist
335 powerpc64 Jakub Jelinek
336 s390 Gerhard Tonn, Ulrich Weigand
337 sh Kaz Kojima
338 sh64 Kaz Kojima
339 sparc Anthony Green, Gordon Irlam
340 x86 Anthony Green, Jon Beniston
341 x86-64 Bo Thorsen
342
343 Jesper Skov and Andrew Haley both did more than their fair share of
344 stepping through the code and tracking down bugs.
345
346 Thanks also to Tom Tromey for bug fixes, documentation and
347 configuration help.
348
349 Thanks to Jim Blandy, who provided some useful feedback on the libffi
350 interface.
351
352 Andreas Tobler has done a tremendous amount of work on the testsuite.
353
354 Alex Oliva solved the executable page problem for SElinux.
355
356 The list above is almost certainly incomplete and inaccurate. I'm
357 happy to make corrections or additions upon request.
358
630b9c0 @atgreen Update to rc2
authored
359 If you have a problem, or have found a bug, please send a note to the
360 author at green@moxielogic.com, or the project mailing list at
361 libffi-discuss@sourceware.org.
Something went wrong with that request. Please try again.