OSDN Git Service

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