Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 1 | Status |
| 2 | ====== |
| 3 | |
Anthony Green | f7c0bc6 | 2009-12-25 01:22:11 -0500 | [diff] [blame] | 4 | libffi-3.0.9 was released on December XX, 2009. Check the libffi web |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 5 | page for updates: <URL:http://sourceware.org/libffi/>. |
| 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 | |
Anthony Green | 0cfe60e | 2009-12-29 10:06:04 -0500 | [diff] [blame^] | 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: |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 45 | |
Anthony Green | 0cfe60e | 2009-12-29 10:06:04 -0500 | [diff] [blame^] | 46 | http://www.moxielogic.org/wiki/index.php?title=Libffi_3.0.9 |
| 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 | |
| 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 Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 84 | |
| 85 | Please send additional platform test results to |
Anthony Green | 0cfe60e | 2009-12-29 10:06:04 -0500 | [diff] [blame^] | 86 | libffi-discuss@sourceware.org and feel free to update the wiki page |
| 87 | above. |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 88 | |
| 89 | Installing libffi |
| 90 | ================= |
| 91 | |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 92 | First you must configure the distribution for your particular |
| 93 | system. 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 |
| 95 | distribution. |
| 96 | |
| 97 | You may want to tell configure where to install the libffi library and |
| 98 | header files. To do that, use the --prefix configure switch. Libffi |
| 99 | will install under /usr/local by default. |
| 100 | |
| 101 | If you want to enable extra run-time debugging checks use the the |
| 102 | --enable-debug configure switch. This is useful when your program dies |
| 103 | mysteriously while using libffi. |
| 104 | |
| 105 | Another useful configure switch is --enable-purify-safety. Using this |
| 106 | will add some extra code which will suppress certain warnings when you |
| 107 | are using Purify with libffi. Only use this switch when using |
| 108 | Purify, as it will slow down the library. |
| 109 | |
| 110 | Configure has many other options. Use "configure --help" to see them all. |
| 111 | |
| 112 | Once configure has finished, type "make". Note that you must be using |
| 113 | GNU make. You can ftp GNU make from prep.ai.mit.edu:/pub/gnu. |
| 114 | |
| 115 | To ensure that libffi is working as advertised, type "make check". |
| 116 | This will require that you have DejaGNU installed. |
| 117 | |
| 118 | To install the library and header files, type "make install". |
| 119 | |
| 120 | |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 121 | History |
| 122 | ======= |
| 123 | |
Anthony Green | f7c0bc6 | 2009-12-25 01:22:11 -0500 | [diff] [blame] | 124 | See the ChangeLog files for details. |
| 125 | |
| 126 | 3.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 Green | 0cfe60e | 2009-12-29 10:06:04 -0500 | [diff] [blame^] | 130 | Build DLL for windows. |
Anthony Green | f7c0bc6 | 2009-12-25 01:22:11 -0500 | [diff] [blame] | 131 | |
| 132 | 3.0.8 Dec-19-08 |
| 133 | Add *BSD, BeOS, and PA-Linux support. |
| 134 | |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 135 | 3.0.7 Nov-11-08 |
| 136 | Fix for ppc FreeBSD. |
| 137 | (thanks to Andreas Tobler) |
| 138 | |
| 139 | 3.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 | |
| 144 | 3.0.5 Apr-3-08 |
| 145 | Fix libffi.pc file. |
| 146 | Fix #define ARM for IcedTea users. |
| 147 | Fix x86 closure bug. |
| 148 | |
| 149 | 3.0.4 Feb-24-08 |
| 150 | Fix x86 OpenBSD configury. |
| 151 | |
| 152 | 3.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 | |
| 157 | 3.0.2 Feb-21-08 |
| 158 | Improved x86 FreeBSD support. |
| 159 | Thanks to Björn König. |
| 160 | |
| 161 | 3.0.1 Feb-15-08 |
| 162 | Fix instruction cache flushing bug on MIPS. |
| 163 | Thanks to David Daney. |
| 164 | |
| 165 | 3.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 | |
| 171 | 1.20 Oct-5-98 |
| 172 | Raffaele Sena produces ARM port. |
| 173 | |
| 174 | 1.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 | |
| 180 | 1.18 Apr-17-98 |
| 181 | Bug fixes and MIPS configuration changes. |
| 182 | |
| 183 | 1.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 | |
| 187 | 1.16 Feb-11-98 |
| 188 | Richard Henderson produces Alpha port. |
| 189 | |
| 190 | 1.15 Dec-4-97 |
| 191 | Fixed an n32 ABI bug. New libtool, auto* support. |
| 192 | |
| 193 | 1.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 | |
| 198 | 1.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 | |
| 204 | 1.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 | |
| 209 | 1.11 Oct-30-96 |
| 210 | Added notes about GNU make. |
| 211 | |
| 212 | 1.10 Oct-29-96 |
| 213 | Added configuration fix for non GNU compilers. |
| 214 | |
| 215 | 1.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 | |
| 220 | 1.08 Oct-15-96 |
| 221 | Fixed n32 problem. Many clean-ups. |
| 222 | |
| 223 | 1.07 Oct-14-96 |
| 224 | Gordon Irlam rewrites v8.S again. Bug fixes. |
| 225 | |
| 226 | 1.06 Oct-14-96 |
| 227 | Gordon Irlam improved the sparc port. |
| 228 | |
| 229 | 1.05 Oct-14-96 |
| 230 | Interface changes based on feedback. |
| 231 | |
| 232 | 1.04 Oct-11-96 |
| 233 | Sparc port complete (modulo struct passing bug). |
| 234 | |
| 235 | 1.03 Oct-10-96 |
| 236 | Passing struct args, and returning struct values works for |
| 237 | all architectures/calling conventions. Expanded tests. |
| 238 | |
| 239 | 1.02 Oct-9-96 |
| 240 | Added SGI n32 support. Fixed bugs in both o32 and Linux support. |
| 241 | Added "make test". |
| 242 | |
| 243 | 1.01 Oct-8-96 |
| 244 | Fixed float passing bug in mips version. Restructured some |
| 245 | of the code. Builds cleanly with SGI tools. |
| 246 | |
| 247 | 1.00 Oct-7-96 |
| 248 | First release. No public announcement. |
| 249 | |
| 250 | |
| 251 | Authors & Credits |
| 252 | ================= |
| 253 | |
Anthony Green | da11bec | 2009-12-24 05:34:46 -0500 | [diff] [blame] | 254 | libffi was originally written by Anthony Green <green@redhat.com>. |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 255 | |
| 256 | The developers of the GNU Compiler Collection project have made |
| 257 | innumerable valuable contributions. See the ChangeLog file for |
| 258 | details. |
| 259 | |
| 260 | Some of the ideas behind libffi were inspired by Gianni Mariani's free |
| 261 | gencall library for Silicon Graphics machines. |
| 262 | |
| 263 | The closure mechanism was designed and implemented by Kresten Krab |
| 264 | Thorup. |
| 265 | |
| 266 | Major processor architecture ports were contributed by the following |
| 267 | developers: |
| 268 | |
| 269 | alpha Richard Henderson |
| 270 | arm Raffaele Sena |
| 271 | cris Simon Posnjak, Hans-Peter Nilsson |
| 272 | frv Anthony Green |
| 273 | ia64 Hans Boehm |
| 274 | m32r Kazuhiro Inaoka |
| 275 | m68k Andreas Schwab |
| 276 | mips Anthony Green, Casey Marshall |
| 277 | mips64 David Daney |
| 278 | pa Randolph Chung, Dave Anglin, Andreas Tobler |
| 279 | powerpc Geoffrey Keating, Andreas Tobler, |
| 280 | David Edelsohn, John Hornkvist |
| 281 | powerpc64 Jakub Jelinek |
| 282 | s390 Gerhard Tonn, Ulrich Weigand |
| 283 | sh Kaz Kojima |
| 284 | sh64 Kaz Kojima |
| 285 | sparc Anthony Green, Gordon Irlam |
| 286 | x86 Anthony Green, Jon Beniston |
| 287 | x86-64 Bo Thorsen |
| 288 | |
| 289 | Jesper Skov and Andrew Haley both did more than their fair share of |
| 290 | stepping through the code and tracking down bugs. |
| 291 | |
| 292 | Thanks also to Tom Tromey for bug fixes, documentation and |
| 293 | configuration help. |
| 294 | |
| 295 | Thanks to Jim Blandy, who provided some useful feedback on the libffi |
| 296 | interface. |
| 297 | |
| 298 | Andreas Tobler has done a tremendous amount of work on the testsuite. |
| 299 | |
| 300 | Alex Oliva solved the executable page problem for SElinux. |
| 301 | |
| 302 | The list above is almost certainly incomplete and inaccurate. I'm |
| 303 | happy to make corrections or additions upon request. |
| 304 | |
| 305 | If you have a problem, or have found a bug, please send a note to |
| 306 | green@redhat.com. |