3.0.9rc12

This commit is contained in:
Anthony Green
2009-12-29 10:06:04 -05:00
parent 14e2e92e86
commit 0cfe60e9d1
51 changed files with 1400 additions and 919 deletions

View File

@@ -0,0 +1,111 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <stdint.h>
#include <inttypes.h>
#include <ffi.h>
#include "fficonfig.h"
#define MAX_ARGS 256
#define CHECK(x) !(x) ? abort() : 0
/* Define __UNUSED__ that also other compilers than gcc can run the tests. */
#undef __UNUSED__
#if defined(__GNUC__)
#define __UNUSED__ __attribute__((__unused__))
#else
#define __UNUSED__
#endif
/* Prefer MAP_ANON(YMOUS) to /dev/zero, since we don't need to keep a
file open. */
#ifdef HAVE_MMAP_ANON
# undef HAVE_MMAP_DEV_ZERO
# include <sys/mman.h>
# ifndef MAP_FAILED
# define MAP_FAILED -1
# endif
# if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
# define MAP_ANONYMOUS MAP_ANON
# endif
# define USING_MMAP
#endif
#ifdef HAVE_MMAP_DEV_ZERO
# include <sys/mman.h>
# ifndef MAP_FAILED
# define MAP_FAILED -1
# endif
# define USING_MMAP
#endif
/* MinGW kludge. */
#ifdef WIN64
#define PRIdLL "PRId64"
#define PRIuLL "PRIu64"
#else
#define PRIdLL "lld"
#define PRIuLL "llu"
#endif
/* PA HP-UX kludge. */
#if defined(__hppa__) && defined(__hpux__) && !defined(PRIuPTR)
#define PRIuPTR "lu"
#endif
/* Solaris < 10 kludge. */
#if defined(__sun__) && defined(__svr4__) && !defined(PRIuPTR)
#if defined(__arch64__) || defined (__x86_64__)
#define PRIuPTR "lu"
#else
#define PRIuPTR "u"
#endif
#endif
#ifdef USING_MMAP
static inline void *
allocate_mmap (size_t size)
{
void *page;
#if defined (HAVE_MMAP_DEV_ZERO)
static int dev_zero_fd = -1;
#endif
#ifdef HAVE_MMAP_DEV_ZERO
if (dev_zero_fd == -1)
{
dev_zero_fd = open ("/dev/zero", O_RDONLY);
if (dev_zero_fd == -1)
{
perror ("open /dev/zero: %m");
exit (1);
}
}
#endif
#ifdef HAVE_MMAP_ANON
page = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
#endif
#ifdef HAVE_MMAP_DEV_ZERO
page = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_PRIVATE, dev_zero_fd, 0);
#endif
if (page == (void *) MAP_FAILED)
{
perror ("virtual memory exhausted");
exit (1);
}
return page;
}
#endif

View File

@@ -0,0 +1,96 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <ffi.h>
#include "fficonfig.h"
#define MAX_ARGS 256
/* Define __UNUSED__ that also other compilers than gcc can run the tests. */
#undef __UNUSED__
#if defined(__GNUC__)
#define __UNUSED__ __attribute__((__unused__))
#else
#define __UNUSED__
#endif
#define CHECK(x) (!(x) ? abort() : (void)0)
/* Prefer MAP_ANON(YMOUS) to /dev/zero, since we don't need to keep a
file open. */
#ifdef HAVE_MMAP_ANON
# undef HAVE_MMAP_DEV_ZERO
# include <sys/mman.h>
# ifndef MAP_FAILED
# define MAP_FAILED -1
# endif
# if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
# define MAP_ANONYMOUS MAP_ANON
# endif
# define USING_MMAP
#endif
#ifdef HAVE_MMAP_DEV_ZERO
# include <sys/mman.h>
# ifndef MAP_FAILED
# define MAP_FAILED -1
# endif
# define USING_MMAP
#endif
/* MinGW kludge. */
#ifdef WIN64
#define PRIdLL "PRId64"
#define PRIuLL "PRIu64"
#else
#define PRIdLL "lld"
#define PRIuLL "llu"
#endif
#ifdef USING_MMAP
static inline void *
allocate_mmap (size_t size)
{
void *page;
#if defined (HAVE_MMAP_DEV_ZERO)
static int dev_zero_fd = -1;
#endif
#ifdef HAVE_MMAP_DEV_ZERO
if (dev_zero_fd == -1)
{
dev_zero_fd = open ("/dev/zero", O_RDONLY);
if (dev_zero_fd == -1)
{
perror ("open /dev/zero: %m");
exit (1);
}
}
#endif
#ifdef HAVE_MMAP_ANON
page = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
#endif
#ifdef HAVE_MMAP_DEV_ZERO
page = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_PRIVATE, dev_zero_fd, 0);
#endif
if (page == MAP_FAILED)
{
perror ("virtual memory exhausted");
exit (1);
}
return page;
}
#endif

370
ChangeLog
View File

@@ -1,3 +1,25 @@
2009-12-28 David Edelsohn <edelsohn@gnu.org>
* src/powerpc/ffi_darwin.c (ffi_prep_args): Copy abi and nargs to
local variables.
(aix_adjust_aggregate_sizes): New function.
(ffi_prep_cif_machdep): Call it.
2009-12-26 Andreas Tobler <a.tobler@schweiz.org>
* configure.ac: Define FFI_MMAP_EXEC_WRIT for the given targets.
* configure: Regenerate.
* fficonfig.h.in: Likewise.
* src/closures.c: Remove the FFI_MMAP_EXEC_WRIT definition for
Solaris/x86.
2009-12-26 Andreas Schwab <schwab@linux-m68k.org>
* src/powerpc/ffi.c (ffi_prep_args_SYSV): Advance intarg_count
when a float arguments is passed in memory.
(ffi_closure_helper_SYSV): Mark general registers as used up when
a 64bit or soft-float long double argument is passed in memory.
2009-12-25 Matthias Klose <doko@ubuntu.com> 2009-12-25 Matthias Klose <doko@ubuntu.com>
* man/ffi_call.3: Fix #include in examples. * man/ffi_call.3: Fix #include in examples.
@@ -10,7 +32,7 @@
IRIX MIPSPro c99. IRIX MIPSPro c99.
* include/ffi_common.h: Added '__sgi' define to non * include/ffi_common.h: Added '__sgi' define to non
'__attribute__((__mode__()))' integer typedefs. '__attribute__((__mode__()))' integer typedefs.
* src/mips/ffi.c (ffi_call, ffi_closure_mips_inner_O32, * src/mips/ffi.c (ffi_call, ffi_closure_mips_inner_O32,
ffi_closure_mips_inner_N32): Added 'defined(_MIPSEB)' to BE check. ffi_closure_mips_inner_N32): Added 'defined(_MIPSEB)' to BE check.
(ffi_closure_mips_inner_O32, ffi_closure_mips_inner_N32): Added (ffi_closure_mips_inner_O32, ffi_closure_mips_inner_N32): Added
FFI_LONGDOUBLE support and alignment(N32 only). FFI_LONGDOUBLE support and alignment(N32 only).
@@ -86,7 +108,7 @@
2009-12-04 David Edelsohn <edelsohn@gnu.org> 2009-12-04 David Edelsohn <edelsohn@gnu.org>
* src/powerpc/aix_closure.S: Reorganize 64-bit code to match * src/powerpc/aix_closure.S: Reorganize 64-bit code to match
linux64_closure.S. linux64_closure.S.
2009-12-04 Uros Bizjak <ubizjak@gmail.com> 2009-12-04 Uros Bizjak <ubizjak@gmail.com>
@@ -292,7 +314,7 @@
* testsuite/libffi.call/err_bad_typedef.c: xfail everywhere. * testsuite/libffi.call/err_bad_typedef.c: xfail everywhere.
* testsuite/libffi.call/err_bad_abi.c: Likewise. * testsuite/libffi.call/err_bad_abi.c: Likewise.
2009-06-12 Andrew Haley <aph@redhat.com> 2009-06-12 Andrew Haley <aph@redhat.com>
* Makefile.am: Remove info_TEXINFOS. * Makefile.am: Remove info_TEXINFOS.
@@ -310,33 +332,33 @@
2009-06-11 Timothy Wall <twall@users.sf.net> 2009-06-11 Timothy Wall <twall@users.sf.net>
* Makefile.am, * Makefile.am,
configure.ac, configure.ac,
include/ffi.h.in, include/ffi.h.in,
include/ffi_common.h, include/ffi_common.h,
src/closures.c, src/closures.c,
src/dlmalloc.c, src/dlmalloc.c,
src/x86/ffi.c, src/x86/ffi.c,
src/x86/ffitarget.h, src/x86/ffitarget.h,
src/x86/win64.S (new), src/x86/win64.S (new),
README: Added win64 support (mingw or MSVC) README: Added win64 support (mingw or MSVC)
* Makefile.in, * Makefile.in,
include/Makefile.in, include/Makefile.in,
man/Makefile.in, man/Makefile.in,
testsuite/Makefile.in, testsuite/Makefile.in,
configure, configure,
aclocal.m4: Regenerated aclocal.m4: Regenerated
* ltcf-c.sh: properly escape cygwin/w32 path * ltcf-c.sh: properly escape cygwin/w32 path
* man/ffi_call.3: Clarify size requirements for return value. * man/ffi_call.3: Clarify size requirements for return value.
* src/x86/ffi64.c: Fix filename in comment. * src/x86/ffi64.c: Fix filename in comment.
* src/x86/win32.S: Remove unused extern. * src/x86/win32.S: Remove unused extern.
* testsuite/libffi.call/closure_fn0.c, * testsuite/libffi.call/closure_fn0.c,
testsuite/libffi.call/closure_fn1.c, testsuite/libffi.call/closure_fn1.c,
testsuite/libffi.call/closure_fn2.c, testsuite/libffi.call/closure_fn2.c,
testsuite/libffi.call/closure_fn3.c, testsuite/libffi.call/closure_fn3.c,
testsuite/libffi.call/closure_fn4.c, testsuite/libffi.call/closure_fn4.c,
testsuite/libffi.call/closure_fn5.c, testsuite/libffi.call/closure_fn5.c,
testsuite/libffi.call/closure_fn6.c, testsuite/libffi.call/closure_fn6.c,
testsuite/libffi.call/closure_stdcall.c, testsuite/libffi.call/closure_stdcall.c,
testsuite/libffi.call/cls_12byte.c, testsuite/libffi.call/cls_12byte.c,
testsuite/libffi.call/cls_16byte.c, testsuite/libffi.call/cls_16byte.c,
@@ -417,8 +439,8 @@
testsuite/libffi.call/stret_large2.c, testsuite/libffi.call/stret_large2.c,
testsuite/libffi.call/stret_medium.c, testsuite/libffi.call/stret_medium.c,
testsuite/libffi.call/stret_medium2.c, testsuite/libffi.call/stret_medium2.c,
testsuite/libffi.special/unwindtest.cc: use ffi_closure_alloc instead testsuite/libffi.special/unwindtest.cc: use ffi_closure_alloc instead
of checking for MMAP. Use intptr_t instead of long casts. of checking for MMAP. Use intptr_t instead of long casts.
2009-06-11 Kaz Kojima <kkojima@gcc.gnu.org> 2009-06-11 Kaz Kojima <kkojima@gcc.gnu.org>
@@ -471,59 +493,59 @@
2008-12-26 Timothy Wall <twall@users.sf.net> 2008-12-26 Timothy Wall <twall@users.sf.net>
* testsuite/libffi.call/cls_longdouble.c, * testsuite/libffi.call/cls_longdouble.c,
testsuite/libffi.call/cls_longdouble_va.c, testsuite/libffi.call/cls_longdouble_va.c,
testsuite/libffi.call/cls_align_longdouble.c, testsuite/libffi.call/cls_align_longdouble.c,
testsuite/libffi.call/cls_align_longdouble_split.c, testsuite/libffi.call/cls_align_longdouble_split.c,
testsuite/libffi.call/cls_align_longdouble_split2.c: mark expected testsuite/libffi.call/cls_align_longdouble_split2.c: mark expected
failures on x86_64 cygwin/mingw. failures on x86_64 cygwin/mingw.
2008-12-22 Timothy Wall <twall@users.sf.net> 2008-12-22 Timothy Wall <twall@users.sf.net>
* testsuite/libffi.call/closure_fn0.c, * testsuite/libffi.call/closure_fn0.c,
testsuite/libffi.call/closure_fn1.c, testsuite/libffi.call/closure_fn1.c,
testsuite/libffi.call/closure_fn2.c, testsuite/libffi.call/closure_fn2.c,
testsuite/libffi.call/closure_fn3.c, testsuite/libffi.call/closure_fn3.c,
testsuite/libffi.call/closure_fn4.c, testsuite/libffi.call/closure_fn4.c,
testsuite/libffi.call/closure_fn5.c, testsuite/libffi.call/closure_fn5.c,
testsuite/libffi.call/closure_fn6.c, testsuite/libffi.call/closure_fn6.c,
testsuite/libffi.call/closure_loc_fn0.c, testsuite/libffi.call/closure_loc_fn0.c,
testsuite/libffi.call/closure_stdcall.c, testsuite/libffi.call/closure_stdcall.c,
testsuite/libffi.call/cls_align_pointer.c, testsuite/libffi.call/cls_align_pointer.c,
testsuite/libffi.call/cls_pointer.c, testsuite/libffi.call/cls_pointer.c,
testsuite/libffi.call/cls_pointer_stack.c: use portable cast from testsuite/libffi.call/cls_pointer_stack.c: use portable cast from
pointer to integer (intptr_t). pointer to integer (intptr_t).
* testsuite/libffi.call/cls_longdouble.c: disable for win64. * testsuite/libffi.call/cls_longdouble.c: disable for win64.
2008-07-24 Anthony Green <green@redhat.com> 2008-07-24 Anthony Green <green@redhat.com>
* testsuite/libffi.call/cls_dbls_struct.c, * testsuite/libffi.call/cls_dbls_struct.c,
testsuite/libffi.call/cls_double_va.c, testsuite/libffi.call/cls_double_va.c,
testsuite/libffi.call/cls_longdouble.c, testsuite/libffi.call/cls_longdouble.c,
testsuite/libffi.call/cls_longdouble_va.c, testsuite/libffi.call/cls_longdouble_va.c,
testsuite/libffi.call/cls_pointer.c, testsuite/libffi.call/cls_pointer.c,
testsuite/libffi.call/cls_pointer_stack.c, testsuite/libffi.call/cls_pointer_stack.c,
testsuite/libffi.call/err_bad_abi.c: Clean up failures from testsuite/libffi.call/err_bad_abi.c: Clean up failures from
compiler warnings. compiler warnings.
2008-03-04 Anthony Green <green@redhat.com> 2008-03-04 Anthony Green <green@redhat.com>
Blake Chaffin Blake Chaffin
hos@tamanegi.org hos@tamanegi.org
* testsuite/libffi.call/cls_align_longdouble_split2.c * testsuite/libffi.call/cls_align_longdouble_split2.c
testsuite/libffi.call/cls_align_longdouble_split.c testsuite/libffi.call/cls_align_longdouble_split.c
testsuite/libffi.call/cls_dbls_struct.c testsuite/libffi.call/cls_dbls_struct.c
testsuite/libffi.call/cls_double_va.c testsuite/libffi.call/cls_double_va.c
testsuite/libffi.call/cls_longdouble.c testsuite/libffi.call/cls_longdouble.c
testsuite/libffi.call/cls_longdouble_va.c testsuite/libffi.call/cls_longdouble_va.c
testsuite/libffi.call/cls_pointer.c testsuite/libffi.call/cls_pointer.c
testsuite/libffi.call/cls_pointer_stack.c testsuite/libffi.call/cls_pointer_stack.c
testsuite/libffi.call/err_bad_abi.c testsuite/libffi.call/err_bad_abi.c
testsuite/libffi.call/err_bad_typedef.c testsuite/libffi.call/err_bad_typedef.c
testsuite/libffi.call/stret_large2.c testsuite/libffi.call/stret_large2.c
testsuite/libffi.call/stret_large.c testsuite/libffi.call/stret_large.c
testsuite/libffi.call/stret_medium2.c testsuite/libffi.call/stret_medium2.c
testsuite/libffi.call/stret_medium.c: New tests from Apple. testsuite/libffi.call/stret_medium.c: New tests from Apple.
2009-06-05 Andrew Haley <aph@redhat.com> 2009-06-05 Andrew Haley <aph@redhat.com>
@@ -536,24 +558,24 @@
stdcall changes. stdcall changes.
2008-02-26 Anthony Green <green@redhat.com> 2008-02-26 Anthony Green <green@redhat.com>
Thomas Heller <theller@ctypes.org> Thomas Heller <theller@ctypes.org>
* src/x86/ffi.c (ffi_closure_SYSV_inner): Change C++ comment to C * src/x86/ffi.c (ffi_closure_SYSV_inner): Change C++ comment to C
comment. comment.
2008-02-03 Timothy Wall <twall@users.sf.net> 2008-02-03 Timothy Wall <twall@users.sf.net>
* src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL): Calculate jump return * src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL): Calculate jump return
offset based on code pointer, not data pointer. offset based on code pointer, not data pointer.
2008-01-31 Timothy Wall <twall@users.sf.net> 2008-01-31 Timothy Wall <twall@users.sf.net>
* testsuite/libffi.call/closure_stdcall.c: Add test for stdcall * testsuite/libffi.call/closure_stdcall.c: Add test for stdcall
closures. closures.
* src/x86/ffitarget.h: Increase size of trampoline for stdcall * src/x86/ffitarget.h: Increase size of trampoline for stdcall
closures. closures.
* src/x86/win32.S: Add assembly for stdcall closure. * src/x86/win32.S: Add assembly for stdcall closure.
* src/x86/ffi.c: Initialize stdcall closure trampoline. * src/x86/ffi.c: Initialize stdcall closure trampoline.
2009-06-04 Andrew Haley <aph@redhat.com> 2009-06-04 Andrew Haley <aph@redhat.com>
@@ -586,10 +608,10 @@
2008-02-15 David Daney <ddaney@avtrex.com> 2008-02-15 David Daney <ddaney@avtrex.com>
* src/mips/ffi.c (USE__BUILTIN___CLEAR_CACHE): * src/mips/ffi.c (USE__BUILTIN___CLEAR_CACHE):
Define (conditionally), and use it to include cachectl.h. Define (conditionally), and use it to include cachectl.h.
(ffi_prep_closure_loc): Fix cache flushing. (ffi_prep_closure_loc): Fix cache flushing.
* src/mips/ffitarget.h (_ABIN32, _ABI64, _ABIO32): Define. * src/mips/ffitarget.h (_ABIN32, _ABI64, _ABIO32): Define.
2009-06-04 Andrew Haley <aph@redhat.com> 2009-06-04 Andrew Haley <aph@redhat.com>
@@ -698,7 +720,7 @@
(ffi_closure_v8): Likewise. (ffi_closure_v8): Likewise.
2008-09-26 Peter O'Gorman <pogma@thewrittenword.com> 2008-09-26 Peter O'Gorman <pogma@thewrittenword.com>
Steve Ellcey <sje@cup.hp.com> Steve Ellcey <sje@cup.hp.com>
* configure: Regenerate for new libtool. * configure: Regenerate for new libtool.
* Makefile.in: Ditto. * Makefile.in: Ditto.
@@ -820,7 +842,7 @@
2007-12-08 David Daney <ddaney@avtrex.com> 2007-12-08 David Daney <ddaney@avtrex.com>
* src/mips/n32.S (ffi_call_N32): Replace dadd with ADDU, dsub with * src/mips/n32.S (ffi_call_N32): Replace dadd with ADDU, dsub with
SUBU, add with ADDU and use smaller code sequences. SUBU, add with ADDU and use smaller code sequences.
2007-12-07 David Daney <ddaney@avtrex.com> 2007-12-07 David Daney <ddaney@avtrex.com>
@@ -846,7 +868,7 @@
sizeof(ffi_java_raw) for alignment calculations. sizeof(ffi_java_raw) for alignment calculations.
(ffi_java_ptrarray_to_raw): Same. (ffi_java_ptrarray_to_raw): Same.
(ffi_java_rvalue_to_raw): Add special handling for FFI_TYPE_POINTER (ffi_java_rvalue_to_raw): Add special handling for FFI_TYPE_POINTER
if FFI_SIZEOF_JAVA_RAW == 4. if FFI_SIZEOF_JAVA_RAW == 4.
(ffi_java_raw_to_rvalue): Same. (ffi_java_raw_to_rvalue): Same.
(ffi_java_raw_call): Change type of raw to ffi_java_raw. (ffi_java_raw_call): Change type of raw to ffi_java_raw.
(ffi_java_translate_args): Same. (ffi_java_translate_args): Same.
@@ -856,7 +878,7 @@
2007-12-06 David Daney <ddaney@avtrex.com> 2007-12-06 David Daney <ddaney@avtrex.com>
* src/mips/n32.S (ffi_closure_N32): Use 64-bit add instruction on * src/mips/n32.S (ffi_closure_N32): Use 64-bit add instruction on
pointer values. pointer values.
2007-12-01 Andreas Tobler <a.tobler@schweiz.org> 2007-12-01 Andreas Tobler <a.tobler@schweiz.org>
@@ -910,7 +932,7 @@
2007-08-05 Steven Newbury <s_j_newbury@yahoo.co.uk> 2007-08-05 Steven Newbury <s_j_newbury@yahoo.co.uk>
* src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Use __clear_cache instead of * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Use __clear_cache instead of
directly using the sys_cacheflush syscall. directly using the sys_cacheflush syscall.
2007-07-27 Andrew Haley <aph@redhat.com> 2007-07-27 Andrew Haley <aph@redhat.com>
@@ -1089,7 +1111,7 @@
* testsuite/libffi.call/return_ul.c (main): Define return type as * testsuite/libffi.call/return_ul.c (main): Define return type as
ffi_arg. Use proper printf conversion specifier. ffi_arg. Use proper printf conversion specifier.
2007-07-30 Andrew Haley <aph@redhat.com> 2007-07-30 Andrew Haley <aph@redhat.com>
PR testsuite/32843 PR testsuite/32843
@@ -1126,84 +1148,84 @@
2005-12-31 Phil Blundell <pb@reciva.com> 2005-12-31 Phil Blundell <pb@reciva.com>
* src/arm/ffi.c (ffi_prep_incoming_args_SYSV, * src/arm/ffi.c (ffi_prep_incoming_args_SYSV,
ffi_closure_SYSV_inner, ffi_prep_closure): New, add closure support. ffi_closure_SYSV_inner, ffi_prep_closure): New, add closure support.
* src/arm/sysv.S(ffi_closure_SYSV): Likewise. * src/arm/sysv.S(ffi_closure_SYSV): Likewise.
* src/arm/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise. * src/arm/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise.
(FFI_CLOSURES): Enable closure support. (FFI_CLOSURES): Enable closure support.
2007-07-03 Andrew Haley <aph@hedges.billgatliff.com> 2007-07-03 Andrew Haley <aph@hedges.billgatliff.com>
* testsuite/libffi.call/cls_multi_ushort.c, * testsuite/libffi.call/cls_multi_ushort.c,
testsuite/libffi.call/cls_align_uint16.c, testsuite/libffi.call/cls_align_uint16.c,
testsuite/libffi.call/nested_struct1.c, testsuite/libffi.call/nested_struct1.c,
testsuite/libffi.call/nested_struct3.c, testsuite/libffi.call/nested_struct3.c,
testsuite/libffi.call/cls_7_1_byte.c, testsuite/libffi.call/cls_7_1_byte.c,
testsuite/libffi.call/cls_double.c, testsuite/libffi.call/cls_double.c,
testsuite/libffi.call/nested_struct5.c, testsuite/libffi.call/nested_struct5.c,
testsuite/libffi.call/nested_struct7.c, testsuite/libffi.call/nested_struct7.c,
testsuite/libffi.call/cls_sint.c, testsuite/libffi.call/cls_sint.c,
testsuite/libffi.call/nested_struct9.c, testsuite/libffi.call/nested_struct9.c,
testsuite/libffi.call/cls_20byte1.c, testsuite/libffi.call/cls_20byte1.c,
testsuite/libffi.call/cls_multi_sshortchar.c, testsuite/libffi.call/cls_multi_sshortchar.c,
testsuite/libffi.call/cls_align_sint64.c, testsuite/libffi.call/cls_align_sint64.c,
testsuite/libffi.call/cls_3byte2.c, testsuite/libffi.call/cls_3byte2.c,
testsuite/libffi.call/cls_multi_schar.c, testsuite/libffi.call/cls_multi_schar.c,
testsuite/libffi.call/cls_multi_uchar.c, testsuite/libffi.call/cls_multi_uchar.c,
testsuite/libffi.call/cls_19byte.c, testsuite/libffi.call/cls_19byte.c,
testsuite/libffi.call/cls_9byte1.c, testsuite/libffi.call/cls_9byte1.c,
testsuite/libffi.call/cls_align_float.c, testsuite/libffi.call/cls_align_float.c,
testsuite/libffi.call/closure_fn1.c, testsuite/libffi.call/closure_fn1.c,
testsuite/libffi.call/problem1.c, testsuite/libffi.call/problem1.c,
testsuite/libffi.call/closure_fn3.c, testsuite/libffi.call/closure_fn3.c,
testsuite/libffi.call/cls_sshort.c, testsuite/libffi.call/cls_sshort.c,
testsuite/libffi.call/closure_fn5.c, testsuite/libffi.call/closure_fn5.c,
testsuite/libffi.call/cls_align_double.c, testsuite/libffi.call/cls_align_double.c,
testsuite/libffi.call/cls_2byte.c, testsuite/libffi.call/cls_2byte.c,
testsuite/libffi.call/nested_struct.c, testsuite/libffi.call/nested_struct.c,
testsuite/libffi.call/nested_struct10.c, testsuite/libffi.call/nested_struct10.c,
testsuite/libffi.call/cls_4byte.c, testsuite/libffi.call/cls_4byte.c,
testsuite/libffi.call/cls_6byte.c, testsuite/libffi.call/cls_6byte.c,
testsuite/libffi.call/cls_8byte.c, testsuite/libffi.call/cls_8byte.c,
testsuite/libffi.call/cls_multi_sshort.c, testsuite/libffi.call/cls_multi_sshort.c,
testsuite/libffi.call/cls_align_uint32.c, testsuite/libffi.call/cls_align_uint32.c,
testsuite/libffi.call/cls_align_sint16.c, testsuite/libffi.call/cls_align_sint16.c,
testsuite/libffi.call/cls_float.c, testsuite/libffi.call/cls_float.c,
testsuite/libffi.call/cls_20byte.c, testsuite/libffi.call/cls_20byte.c,
testsuite/libffi.call/cls_5_1_byte.c, testsuite/libffi.call/cls_5_1_byte.c,
testsuite/libffi.call/nested_struct2.c, testsuite/libffi.call/nested_struct2.c,
testsuite/libffi.call/cls_24byte.c, testsuite/libffi.call/cls_24byte.c,
testsuite/libffi.call/nested_struct4.c, testsuite/libffi.call/nested_struct4.c,
testsuite/libffi.call/nested_struct6.c, testsuite/libffi.call/nested_struct6.c,
testsuite/libffi.call/cls_64byte.c, testsuite/libffi.call/cls_64byte.c,
testsuite/libffi.call/nested_struct8.c, testsuite/libffi.call/nested_struct8.c,
testsuite/libffi.call/cls_uint.c, testsuite/libffi.call/cls_uint.c,
testsuite/libffi.call/cls_multi_ushortchar.c, testsuite/libffi.call/cls_multi_ushortchar.c,
testsuite/libffi.call/cls_schar.c, testsuite/libffi.call/cls_schar.c,
testsuite/libffi.call/cls_uchar.c, testsuite/libffi.call/cls_uchar.c,
testsuite/libffi.call/cls_align_uint64.c, testsuite/libffi.call/cls_align_uint64.c,
testsuite/libffi.call/cls_ulonglong.c, testsuite/libffi.call/cls_ulonglong.c,
testsuite/libffi.call/cls_align_longdouble.c, testsuite/libffi.call/cls_align_longdouble.c,
testsuite/libffi.call/cls_1_1byte.c, testsuite/libffi.call/cls_1_1byte.c,
testsuite/libffi.call/cls_12byte.c, testsuite/libffi.call/cls_12byte.c,
testsuite/libffi.call/cls_3_1byte.c, testsuite/libffi.call/cls_3_1byte.c,
testsuite/libffi.call/cls_3byte1.c, testsuite/libffi.call/cls_3byte1.c,
testsuite/libffi.call/cls_4_1byte.c, testsuite/libffi.call/cls_4_1byte.c,
testsuite/libffi.call/cls_6_1_byte.c, testsuite/libffi.call/cls_6_1_byte.c,
testsuite/libffi.call/cls_16byte.c, testsuite/libffi.call/cls_16byte.c,
testsuite/libffi.call/cls_18byte.c, testsuite/libffi.call/cls_18byte.c,
testsuite/libffi.call/closure_fn0.c, testsuite/libffi.call/closure_fn0.c,
testsuite/libffi.call/cls_9byte2.c, testsuite/libffi.call/cls_9byte2.c,
testsuite/libffi.call/closure_fn2.c, testsuite/libffi.call/closure_fn2.c,
testsuite/libffi.call/closure_fn4.c, testsuite/libffi.call/closure_fn4.c,
testsuite/libffi.call/cls_ushort.c, testsuite/libffi.call/cls_ushort.c,
testsuite/libffi.call/closure_fn6.c, testsuite/libffi.call/closure_fn6.c,
testsuite/libffi.call/cls_5byte.c, testsuite/libffi.call/cls_5byte.c,
testsuite/libffi.call/cls_align_pointer.c, testsuite/libffi.call/cls_align_pointer.c,
testsuite/libffi.call/cls_7byte.c, testsuite/libffi.call/cls_7byte.c,
testsuite/libffi.call/cls_align_sint32.c, testsuite/libffi.call/cls_align_sint32.c,
testsuite/libffi.special/unwindtest_ffi_call.cc, testsuite/libffi.special/unwindtest_ffi_call.cc,
testsuite/libffi.special/unwindtest.cc: Enable for ARM. testsuite/libffi.special/unwindtest.cc: Enable for ARM.
2007-07-05 H.J. Lu <hongjiu.lu@intel.com> 2007-07-05 H.J. Lu <hongjiu.lu@intel.com>
@@ -1295,7 +1317,7 @@
* testsuite/libffi.call/return_fl2.c (return_fl): Mark as static. * testsuite/libffi.call/return_fl2.c (return_fl): Mark as static.
Use 'volatile float sum' to create sum of floats to avoid false Use 'volatile float sum' to create sum of floats to avoid false
negative due to excess precision on ix86 targets. negative due to excess precision on ix86 targets.
(main): Ditto. (main): Ditto.
2007-03-08 Alexandre Oliva <aoliva@redhat.com> 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
@@ -1410,7 +1432,7 @@
2006-10-10 Paolo Bonzini <bonzini@gnu.org> 2006-10-10 Paolo Bonzini <bonzini@gnu.org>
Sandro Tolaini <tolaini@libero.it> Sandro Tolaini <tolaini@libero.it>
* configure.ac [i*86-*-darwin*]: Set X86_DARWIN symbol and * configure.ac [i*86-*-darwin*]: Set X86_DARWIN symbol and
conditional. conditional.
* configure: Regenerated. * configure: Regenerated.
* Makefile.am (nodist_libffi_la_SOURCES) [X86_DARWIN]: New case. * Makefile.am (nodist_libffi_la_SOURCES) [X86_DARWIN]: New case.
@@ -1745,7 +1767,7 @@
* src/sh/ffi.c (ffi_closure_helper_SYSV): Remove unused variable * src/sh/ffi.c (ffi_closure_helper_SYSV): Remove unused variable
and cast integer to void * if needed. Update the pointer to and cast integer to void * if needed. Update the pointer to
the FP register saved area correctly. the FP register saved area correctly.
2006-02-17 Andreas Tobler <a.tobler@schweiz.ch> 2006-02-17 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/libffi.call/nested_struct6.c: XFAIL this test until PR25630 * testsuite/libffi.call/nested_struct6.c: XFAIL this test until PR25630
@@ -1937,7 +1959,7 @@
* configure.ac: Treat i*86-*-solaris2.10 and up as X86_64. * configure.ac: Treat i*86-*-solaris2.10 and up as X86_64.
* configure: Regenerate. * configure: Regenerate.
2005-06-01 Alan Modra <amodra@bigpond.net.au> 2005-06-01 Alan Modra <amodra@bigpond.net.au>
* src/powerpc/ppc_closure.S (ffi_closure_SYSV): Don't use JUMPTARGET * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Don't use JUMPTARGET
@@ -1951,7 +1973,7 @@
* Makefile.am (ACLOCAL_AMFLAGS): Remove -I ../config. * Makefile.am (ACLOCAL_AMFLAGS): Remove -I ../config.
* aclocal.m4, configure, fficonfig.h.in, Makefile.in, * aclocal.m4, configure, fficonfig.h.in, Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerate. include/Makefile.in, testsuite/Makefile.in: Regenerate.
2005-05-09 Mike Stump <mrs@apple.com> 2005-05-09 Mike Stump <mrs@apple.com>
* configure: Regenerate. * configure: Regenerate.
@@ -1983,7 +2005,7 @@
* testsuite/lib/libffi-dg.exp (libffi-dg-test-1): In regsub use, * testsuite/lib/libffi-dg.exp (libffi-dg-test-1): In regsub use,
have Tcl8.3-compatible intermediate variable. have Tcl8.3-compatible intermediate variable.
2005-04-18 Simon Posnjak <simon.posnjak@siol.net> 2005-04-18 Simon Posnjak <simon.posnjak@siol.net>
Hans-Peter Nilsson <hp@axis.com> Hans-Peter Nilsson <hp@axis.com>
* Makefile.am: Add CRIS support. * Makefile.am: Add CRIS support.
@@ -2004,7 +2026,7 @@
2005-03-30 Hans Boehm <Hans.Boehm@hp.com> 2005-03-30 Hans Boehm <Hans.Boehm@hp.com>
* src/ia64/ffitarget.h (ffi_arg): Use long long instead of DI. * src/ia64/ffitarget.h (ffi_arg): Use long long instead of DI.
2005-03-30 Steve Ellcey <sje@cup.hp.com> 2005-03-30 Steve Ellcey <sje@cup.hp.com>
* src/ia64/ffitarget.h (ffi_arg) ADD DI attribute. * src/ia64/ffitarget.h (ffi_arg) ADD DI attribute.

View File

@@ -65,6 +65,12 @@
* configure: Rebuilt. * configure: Rebuilt.
* fficonfig.h.in: Rebuilt. * fficonfig.h.in: Rebuilt.
2009-12-29 Kay Tietz <ktietz70@googlemail.com>
* testsuite/libffi.call/ffitest.h,
testsuite/libffi.special/ffitestcxx.h (PRIdLL, PRuLL): Fix
definitions.
2009-12-25 Carlo Bramini <carlo.bramix@libero.it> 2009-12-25 Carlo Bramini <carlo.bramix@libero.it>
* configure.ac (AM_LTLDFLAGS): Define for windows hosts. * configure.ac (AM_LTLDFLAGS): Define for windows hosts.
@@ -83,20 +89,6 @@
* testsuite/libffi.call/cls_longdouble.c: Ditto. * testsuite/libffi.call/cls_longdouble.c: Ditto.
* testsuite/libffi.call/cls_double_va.c: Ditto. * testsuite/libffi.call/cls_double_va.c: Ditto.
2009-12-25 Andreas Tobler <a.tobler@schweiz.org>
* fficonfig.h.in: Rebuilt again.
* src/closures.c: Remove the FFI_MMAP_EXEC_WRIT definition for
Solaris/x86.
2009-10-27 Abdulaziz Ghuloum <aghuloum@gmail.com>
* configure.ac (FFI_MMAP_EXEC_WRIT): Define for snow
leopard (i?86-apple-darwin10*).
* configure: Rebuilt.
* fficonfig.h.in: Rebuilt.
* src/closures.c (dlmmap): Define version for snow leopard.
2009-06-16 Andrew Haley <aph@redhat.com> 2009-06-16 Andrew Haley <aph@redhat.com>
* testsuite/libffi.call/cls_align_sint64.c, * testsuite/libffi.call/cls_align_sint64.c,

129
README
View File

@@ -39,41 +39,56 @@ between the two languages.
Supported Platforms Supported Platforms
=================== ===================
Libffi has been ported to many different platforms, although this Libffi has been ported to many different platforms.
release was only tested on: For specific configuration details and testing status, please
refer to the wiki page here:
arm oabi linux http://www.moxielogic.org/wiki/index.php?title=Libffi_3.0.9
arm eabi linux
hppa linux At the time of release, the following basic configurations have been
mips o32 linux (little endian) tested:
powerpc darwin
powerpc freebsd |--------------+------------------|
powerpc64 linux | Architecture | Operating System |
sparc solaris |--------------+------------------|
sparc64 freebsd | Alpha | Linux |
sparc64 solaris | ARM | Linux |
x86 cygwin | AVR32 | Linux |
x86 darwin | HPPA | HPUX |
x86 freebsd | IA-64 | Linux |
x86 linux | MIPS | IRIX |
x86 openbsd | MIPS | Linux |
x86 solaris | MIPS64 | Linux |
x86-64 mingw | PowerPC | Linux |
x86-64 darwin | PowerPC | Mac OSX |
x86-64 linux | PowerPC | FreeBSD |
x86-64 OS X | PowerPC64 | Linux |
x86-64 freebsd | S390 | Linux |
x86-64 solaris | S390X | Linux |
| SPARC | Linux |
| SPARC | Solaris |
| SPARC64 | Linux |
| SPARC64 | FreeBSD |
| X86 | FreeBSD |
| X86 | kFreeBSD |
| X86 | Linux |
| X86 | Mac OSX |
| X86 | OpenBSD |
| X86 | Solaris |
| X86 | Windows/Cygwin |
| X86 | Windows/MingW |
| X86-64 | FreeBSD |
| X86-64 | Linux |
| X86-64 | OpenBSD |
|--------------+------------------|
Please send additional platform test results to Please send additional platform test results to
libffi-discuss@sourceware.org. libffi-discuss@sourceware.org and feel free to update the wiki page
above.
Installing libffi Installing libffi
================= =================
[Note: before actually performing any of these installation steps,
you may wish to read the "Platform Specific Notes" below.]
First you must configure the distribution for your particular First you must configure the distribution for your particular
system. Go to the directory you wish to build libffi in and run the system. Go to the directory you wish to build libffi in and run the
"configure" program found in the root directory of the libffi source "configure" program found in the root directory of the libffi source
@@ -103,63 +118,6 @@ This will require that you have DejaGNU installed.
To install the library and header files, type "make install". To install the library and header files, type "make install".
Platform Specific Notes
=======================
MIPS - Irix 5.3 & 6.x
---------------------
Irix 6.2 and better supports three different calling conventions: o32,
n32 and n64. Currently, libffi only supports both o32 and n32 under
Irix 6.x, but only o32 under Irix 5.3. Libffi will automatically be
configured for whichever calling convention it was built for.
By default, the configure script will try to build libffi with the GNU
development tools. To build libffi with the SGI development tools, set
the environment variable CC to either "cc -32" or "cc -n32" before
running configure under Irix 6.x (depending on whether you want an o32
or n32 library), or just "cc" for Irix 5.3.
With the n32 calling convention, when returning structures smaller
than 16 bytes, be sure to provide an RVALUE that is 8 byte aligned.
Here's one way of forcing this:
double struct_storage[2];
my_small_struct *s = (my_small_struct *) struct_storage;
/* Use s for RVALUE */
If you don't do this you are liable to get spurious bus errors.
"long long" values are not supported yet.
You must use GNU Make to build libffi on SGI platforms.
PowerPC System V ABI
--------------------
There are two `System V ABI's which libffi implements for PowerPC.
They differ only in how small structures are returned from functions.
In the FFI_SYSV version, structures that are 8 bytes or smaller are
returned in registers. This is what GCC does when it is configured
for solaris, and is what the System V ABI I have (dated September
1995) says.
In the FFI_GCC_SYSV version, all structures are returned the same way:
by passing a pointer as the first argument to the function. This is
what GCC does when it is configured for linux or a generic sysv
target.
EGCS 1.0.1 (and probably other versions of EGCS/GCC) also has a
inconsistency with the SysV ABI: When a procedure is called with many
floating-point arguments, some of them get put on the stack. They are
all supposed to be stored in double-precision format, even if they are
only single-precision, but EGCS stores single-precision arguments as
single-precision anyway. This causes one test to fail (the `many
arguments' test).
History History
======= =======
@@ -169,6 +127,7 @@ See the ChangeLog files for details.
Add AVR32 and win64 ports. Add ARM softfp support. Add AVR32 and win64 ports. Add ARM softfp support.
Many fixes for AIX, Solaris, HP-UX, *BSD. Many fixes for AIX, Solaris, HP-UX, *BSD.
Fix x86-64 closure bug. Fix x86-64 closure bug.
Build DLL for windows.
3.0.8 Dec-19-08 3.0.8 Dec-19-08
Add *BSD, BeOS, and PA-Linux support. Add *BSD, BeOS, and PA-Linux support.

24
configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for libffi 3.0.9rc11. # Generated by GNU Autoconf 2.63 for libffi 3.0.9rc12.
# #
# Report bugs to <http://gcc.gnu.org/bugs.html>. # Report bugs to <http://gcc.gnu.org/bugs.html>.
# #
@@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package. # Identity of this package.
PACKAGE_NAME='libffi' PACKAGE_NAME='libffi'
PACKAGE_TARNAME='libffi' PACKAGE_TARNAME='libffi'
PACKAGE_VERSION='3.0.9rc11' PACKAGE_VERSION='3.0.9rc12'
PACKAGE_STRING='libffi 3.0.9rc11' PACKAGE_STRING='libffi 3.0.9rc12'
PACKAGE_BUGREPORT='http://gcc.gnu.org/bugs.html' PACKAGE_BUGREPORT='http://gcc.gnu.org/bugs.html'
# Factoring default headers for most tests. # Factoring default headers for most tests.
@@ -1542,7 +1542,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures libffi 3.0.9rc11 to adapt to many kinds of systems. \`configure' configures libffi 3.0.9rc12 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1613,7 +1613,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of libffi 3.0.9rc11:";; short | recursive ) echo "Configuration of libffi 3.0.9rc12:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@@ -1720,7 +1720,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
libffi configure 3.0.9rc11 libffi configure 3.0.9rc12
generated by GNU Autoconf 2.63 generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1734,7 +1734,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by libffi $as_me 3.0.9rc11, which was It was created by libffi $as_me 3.0.9rc12, which was
generated by GNU Autoconf 2.63. Invocation command line was generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@ $ $0 $@
@@ -2716,7 +2716,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='libffi' PACKAGE='libffi'
VERSION='3.0.9rc11' VERSION='3.0.9rc12'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@@ -14501,13 +14501,13 @@ _ACEOF
fi fi
case "$target" in case "$target" in
*-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*) *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
#define FFI_MMAP_EXEC_WRIT 1 #define FFI_MMAP_EXEC_WRIT 1
_ACEOF _ACEOF
;; ;;
esac esac
{ $as_echo "$as_me:$LINENO: checking whether .eh_frame section should be read-only" >&5 { $as_echo "$as_me:$LINENO: checking whether .eh_frame section should be read-only" >&5
@@ -15315,7 +15315,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by libffi $as_me 3.0.9rc11, which was This file was extended by libffi $as_me 3.0.9rc12, which was
generated by GNU Autoconf 2.63. Invocation command line was generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@@ -15382,7 +15382,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\ ac_cs_version="\\
libffi config.status 3.0.9rc11 libffi config.status 3.0.9rc12
configured by $0, generated by GNU Autoconf 2.63, configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

View File

@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
AC_PREREQ(2.63) AC_PREREQ(2.63)
AC_INIT([libffi], [3.0.9rc11], [http://gcc.gnu.org/bugs.html]) AC_INIT([libffi], [3.0.9rc12], [http://gcc.gnu.org/bugs.html])
AC_CONFIG_HEADERS([fficonfig.h]) AC_CONFIG_HEADERS([fficonfig.h])
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
@@ -277,12 +277,12 @@ if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64
fi fi
case "$target" in case "$target" in
*-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*) *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1, AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1,
[Cannot use malloc on this target, so, we revert to [Cannot use malloc on this target, so, we revert to
alternative means]) alternative means])
;; ;;
esac esac
AC_CACHE_CHECK([whether .eh_frame section should be read-only], AC_CACHE_CHECK([whether .eh_frame section should be read-only],
libffi_cv_ro_eh_frame, [ libffi_cv_ro_eh_frame, [

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/doc svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/doc
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,4 +1,4 @@
@set UPDATED 26 December 2009 @set UPDATED 26 December 2009
@set UPDATED-MONTH December 2009 @set UPDATED-MONTH December 2009
@set EDITION 3.0.9rc11 @set EDITION 3.0.9rc12
@set VERSION 3.0.9rc11 @set VERSION 3.0.9rc12

View File

@@ -1,4 +1,4 @@
@set UPDATED 26 December 2009 @set UPDATED 26 December 2009
@set UPDATED-MONTH December 2009 @set UPDATED-MONTH December 2009
@set EDITION 3.0.9rc11 @set EDITION 3.0.9rc12
@set VERSION 3.0.9rc11 @set VERSION 3.0.9rc12

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/include svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/include
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/man svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/man
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -14,10 +14,10 @@ Index: libffi/ChangeLog.libffi
+ * testsuite/libffi.call/cls_longdouble.c: Ditto. + * testsuite/libffi.call/cls_longdouble.c: Ditto.
+ * testsuite/libffi.call/cls_double_va.c: Ditto. + * testsuite/libffi.call/cls_double_va.c: Ditto.
+ +
2009-12-25 Andreas Tobler <a.tobler@schweiz.org> 2009-06-16 Andrew Haley <aph@redhat.com>
* fficonfig.h.in: Rebuilt again. * testsuite/libffi.call/cls_align_sint64.c,
@@ -187,20 +198,20 @@ @@ -173,20 +184,20 @@
2008-12-22 Timothy Wall <twall@users.sf.net> 2008-12-22 Timothy Wall <twall@users.sf.net>
* testsuite/libffi.call/closure_fn0.c, * testsuite/libffi.call/closure_fn0.c,

View File

@@ -10,15 +10,7 @@ Index: libffi/src/powerpc/ffi.c
PowerPC Foreign Function Interface PowerPC Foreign Function Interface
@@ -185,6 +186,7 @@ ffi_prep_args_SYSV (extended_cif *ecif, @@ -1204,6 +1205,7 @@ ffi_closure_helper_SYSV (ffi_closure *cl
{
*next_arg.f = (float) double_tmp;
next_arg.u += 1;
+ intarg_count++;
}
else
*fpr_base.d++ = double_tmp;
@@ -1149,6 +1151,7 @@ ffi_closure_helper_SYSV (ffi_closure *cl
pst++; pst++;
avalue[i] = pst; avalue[i] = pst;
pst += 2; pst += 2;
@@ -26,14 +18,6 @@ Index: libffi/src/powerpc/ffi.c
} }
break; break;
@@ -1222,6 +1225,7 @@ ffi_closure_helper_SYSV (ffi_closure *cl
{
avalue[i] = pst;
pst += 4;
+ ng = 8;
}
break;
}
Index: libffi/ChangeLog.libffi Index: libffi/ChangeLog.libffi
=================================================================== ===================================================================
--- libffi.orig/ChangeLog.libffi --- libffi.orig/ChangeLog.libffi

View File

@@ -1,5 +1,4 @@
stand-alone stand-alone
snow-leopard
fix-huge_struct-test fix-huge_struct-test
windows windows
undefine_AC_ARG_VAR_PRECIOUS undefine_AC_ARG_VAR_PRECIOUS

View File

@@ -1,56 +1,3 @@
Index: libffi/src/closures.c
===================================================================
--- libffi.orig/src/closures.c
+++ libffi/src/closures.c
@@ -50,11 +50,6 @@
executable memory. */
# define FFI_MMAP_EXEC_WRIT 1
# endif
-# if defined(X86_64) && defined(__sun__) && defined(__svr4__)
-/* The data segment on 64-bit Solaris/x86 isn't executable, so use mmap
- instead. */
-# define FFI_MMAP_EXEC_WRIT 1
-# endif
#endif
#if FFI_MMAP_EXEC_WRIT && !defined FFI_MMAP_EXEC_SELINUX
@@ -214,6 +209,8 @@ static int dlmunmap(void *, size_t);
#if !(defined(X86_WIN32) || defined(X86_WIN64)) || defined (__CYGWIN__)
+#if FFI_MMAP_EXEC_SELINUX
+
/* A mutex used to synchronize access to *exec* variables in this file. */
static pthread_mutex_t open_temp_exec_file_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -483,6 +480,27 @@ dlmmap (void *start, size_t length, int
return dlmmap_locked (start, length, prot, flags, offset);
}
+#else
+
+static void *
+dlmmap (void *start, size_t length, int prot,
+ int flags, int fd, off_t offset)
+{
+
+ assert (start == NULL && length % malloc_getpagesize == 0
+ && prot == (PROT_READ | PROT_WRITE)
+ && flags == (MAP_PRIVATE | MAP_ANONYMOUS)
+ && fd == -1 && offset == 0);
+
+#if FFI_CLOSURE_TEST
+ printf ("mapping in %zi\n", length);
+#endif
+
+ return mmap (start, length, prot | PROT_EXEC, flags, fd, offset);
+}
+
+#endif
+
/* Release memory at the given address, as well as the corresponding
executable page if it's separate. */
static int
Index: libffi/ChangeLog.libffi Index: libffi/ChangeLog.libffi
=================================================================== ===================================================================
--- libffi.orig/ChangeLog.libffi --- libffi.orig/ChangeLog.libffi
@@ -77,9 +24,9 @@ Index: libffi/configure.ac
=================================================================== ===================================================================
--- libffi.orig/configure.ac --- libffi.orig/configure.ac
+++ libffi/configure.ac +++ libffi/configure.ac
@@ -274,6 +274,14 @@ if test x$TARGET = xX86 || test x$TARGET @@ -282,6 +282,14 @@ case "$target" in
fi ;;
fi esac
+case "$target" in +case "$target" in
+ *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*) + *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
@@ -96,9 +43,9 @@ Index: libffi/configure
=================================================================== ===================================================================
--- libffi.orig/configure --- libffi.orig/configure
+++ libffi/configure +++ libffi/configure
@@ -14497,6 +14497,16 @@ _ACEOF @@ -14507,6 +14507,16 @@ _ACEOF
fi ;;
fi esac
+case "$target" in +case "$target" in
+ *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*) + *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
@@ -113,17 +60,3 @@ Index: libffi/configure
{ $as_echo "$as_me:$LINENO: checking whether .eh_frame section should be read-only" >&5 { $as_echo "$as_me:$LINENO: checking whether .eh_frame section should be read-only" >&5
$as_echo_n "checking whether .eh_frame section should be read-only... " >&6; } $as_echo_n "checking whether .eh_frame section should be read-only... " >&6; }
if test "${libffi_cv_ro_eh_frame+set}" = set; then if test "${libffi_cv_ro_eh_frame+set}" = set; then
Index: libffi/fficonfig.h.in
===================================================================
--- libffi.orig/fficonfig.h.in
+++ libffi/fficonfig.h.in
@@ -17,6 +17,9 @@
/* Define this if you want extra debugging. */
#undef FFI_DEBUG
+/* Cannot use malloc on this target, so, we revert to alternative means */
+#undef FFI_MMAP_EXEC_WRIT
+
/* Define this is you do not want support for the raw API. */
#undef FFI_NO_RAW_API

View File

@@ -12796,7 +12796,7 @@ Index: libffi/configure
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for libffi 3.0.8. -# Generated by GNU Autoconf 2.64 for libffi 3.0.8.
+# Generated by GNU Autoconf 2.63 for libffi 3.0.9rc11. +# Generated by GNU Autoconf 2.63 for libffi 3.0.9rc12.
# #
# Report bugs to <http://gcc.gnu.org/bugs.html>. # Report bugs to <http://gcc.gnu.org/bugs.html>.
# #
@@ -13752,8 +13752,8 @@ Index: libffi/configure
PACKAGE_TARNAME='libffi' PACKAGE_TARNAME='libffi'
-PACKAGE_VERSION='3.0.8' -PACKAGE_VERSION='3.0.8'
-PACKAGE_STRING='libffi 3.0.8' -PACKAGE_STRING='libffi 3.0.8'
+PACKAGE_VERSION='3.0.9rc11' +PACKAGE_VERSION='3.0.9rc12'
+PACKAGE_STRING='libffi 3.0.9rc11' +PACKAGE_STRING='libffi 3.0.9rc12'
PACKAGE_BUGREPORT='http://gcc.gnu.org/bugs.html' PACKAGE_BUGREPORT='http://gcc.gnu.org/bugs.html'
-PACKAGE_URL='' -PACKAGE_URL=''
@@ -13918,7 +13918,7 @@ Index: libffi/configure
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
-\`configure' configures libffi 3.0.8 to adapt to many kinds of systems. -\`configure' configures libffi 3.0.8 to adapt to many kinds of systems.
+\`configure' configures libffi 3.0.9rc11 to adapt to many kinds of systems. +\`configure' configures libffi 3.0.9rc12 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -13927,7 +13927,7 @@ Index: libffi/configure
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
- short | recursive ) echo "Configuration of libffi 3.0.8:";; - short | recursive ) echo "Configuration of libffi 3.0.8:";;
+ short | recursive ) echo "Configuration of libffi 3.0.9rc11:";; + short | recursive ) echo "Configuration of libffi 3.0.9rc12:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@@ -13945,7 +13945,7 @@ Index: libffi/configure
cat <<\_ACEOF cat <<\_ACEOF
-libffi configure 3.0.8 -libffi configure 3.0.8
-generated by GNU Autoconf 2.64 -generated by GNU Autoconf 2.64
+libffi configure 3.0.9rc11 +libffi configure 3.0.9rc12
+generated by GNU Autoconf 2.63 +generated by GNU Autoconf 2.63
-Copyright (C) 2009 Free Software Foundation, Inc. -Copyright (C) 2009 Free Software Foundation, Inc.
@@ -14045,7 +14045,7 @@ Index: libffi/configure
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo - rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval - return $ac_retval
+It was created by libffi $as_me 3.0.9rc11, which was +It was created by libffi $as_me 3.0.9rc12, which was
+generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was
-} # ac_fn_c_try_link -} # ac_fn_c_try_link
@@ -15318,7 +15318,7 @@ Index: libffi/configure
# Define the identity of the package. # Define the identity of the package.
PACKAGE='libffi' PACKAGE='libffi'
- VERSION='3.0.8' - VERSION='3.0.8'
+ VERSION='3.0.9rc11' + VERSION='3.0.9rc12'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@@ -23803,7 +23803,7 @@ Index: libffi/configure
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
@@ -12396,18 +14486,20 @@ else @@ -12396,11 +14486,13 @@ else
fi fi
fi fi
@@ -23819,6 +23819,17 @@ Index: libffi/configure
fi fi
fi fi
@@ -12408,14 +14500,16 @@ fi
case "$target" in
*-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
-$as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
+cat >>confdefs.h <<\_ACEOF
+#define FFI_MMAP_EXEC_WRIT 1
+_ACEOF
;;
esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether .eh_frame section should be read-only" >&5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether .eh_frame section should be read-only" >&5
+{ $as_echo "$as_me:$LINENO: checking whether .eh_frame section should be read-only" >&5 +{ $as_echo "$as_me:$LINENO: checking whether .eh_frame section should be read-only" >&5
@@ -23828,7 +23839,7 @@ Index: libffi/configure
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
@@ -12424,35 +14516,41 @@ else @@ -12432,35 +14526,41 @@ else
rm -f conftest.* rm -f conftest.*
fi fi
@@ -23879,7 +23890,7 @@ Index: libffi/configure
if grep '\.hidden.*foo' conftest.s >/dev/null; then if grep '\.hidden.*foo' conftest.s >/dev/null; then
libffi_cv_hidden_visibility_attribute=yes libffi_cv_hidden_visibility_attribute=yes
fi fi
@@ -12460,11 +14558,13 @@ else @@ -12468,11 +14568,13 @@ else
rm -f conftest.* rm -f conftest.*
fi fi
@@ -23895,7 +23906,7 @@ Index: libffi/configure
fi fi
@@ -12475,41 +14575,50 @@ fi @@ -12483,41 +14585,50 @@ fi
@@ -23954,7 +23965,7 @@ Index: libffi/configure
fi fi
fi fi
@@ -12545,7 +14654,7 @@ ac_config_commands="$ac_config_commands @@ -12553,7 +14664,7 @@ ac_config_commands="$ac_config_commands
ac_config_links="$ac_config_links include/ffitarget.h:src/$TARGETDIR/ffitarget.h" ac_config_links="$ac_config_links include/ffitarget.h:src/$TARGETDIR/ffitarget.h"
@@ -23963,7 +23974,7 @@ Index: libffi/configure
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
@@ -12575,13 +14684,13 @@ _ACEOF @@ -12583,13 +14694,13 @@ _ACEOF
case $ac_val in #( case $ac_val in #(
*${as_nl}*) *${as_nl}*)
case $ac_var in #( case $ac_var in #(
@@ -23979,7 +23990,7 @@ Index: libffi/configure
esac ;; esac ;;
esac esac
done done
@@ -12589,8 +14698,8 @@ $as_echo "$as_me: WARNING: cache variabl @@ -12597,8 +14708,8 @@ $as_echo "$as_me: WARNING: cache variabl
(set) 2>&1 | (set) 2>&1 |
case $as_nl`(ac_space=' '; set) 2>&1` in #( case $as_nl`(ac_space=' '; set) 2>&1` in #(
*${as_nl}ac_space=\ *) *${as_nl}ac_space=\ *)
@@ -23990,7 +24001,7 @@ Index: libffi/configure
sed -n \ sed -n \
"s/'/'\\\\''/g; "s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -12613,11 +14722,11 @@ $as_echo "$as_me: WARNING: cache variabl @@ -12621,11 +14732,11 @@ $as_echo "$as_me: WARNING: cache variabl
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then if test -w "$cache_file"; then
test "x$cache_file" != "x/dev/null" && test "x$cache_file" != "x/dev/null" &&
@@ -24004,7 +24015,7 @@ Index: libffi/configure
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi fi
fi fi
@@ -12637,8 +14746,8 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" @@ -12645,8 +14756,8 @@ for ac_i in : $LIBOBJS; do test "x$ac_i"
ac_i=`$as_echo "$ac_i" | sed "$ac_script"` ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built. # will be set to the directory where LIBOBJS objects are built.
@@ -24015,7 +24026,7 @@ Index: libffi/configure
done done
LIBOBJS=$ac_libobjs LIBOBJS=$ac_libobjs
@@ -12654,128 +14763,221 @@ else @@ -12662,128 +14773,221 @@ else
fi fi
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
@@ -24299,7 +24310,7 @@ Index: libffi/configure
fi fi
@@ -12783,10 +14985,9 @@ fi @@ -12791,10 +14995,9 @@ fi
ac_write_fail=0 ac_write_fail=0
ac_clean_files_save=$ac_clean_files ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS" ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -24312,7 +24323,7 @@ Index: libffi/configure
#! $SHELL #! $SHELL
# Generated by $as_me. # Generated by $as_me.
# Run this file to recreate the current configuration. # Run this file to recreate the current configuration.
@@ -12796,18 +14997,17 @@ cat >$CONFIG_STATUS <<_ASEOF || as_write @@ -12804,18 +15007,17 @@ cat >$CONFIG_STATUS <<_ASEOF || as_write
debug=false debug=false
ac_cs_recheck=false ac_cs_recheck=false
ac_cs_silent=false ac_cs_silent=false
@@ -24338,7 +24349,7 @@ Index: libffi/configure
emulate sh emulate sh
NULLCMD=: NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
@@ -12815,15 +15015,23 @@ if test -n "${ZSH_VERSION+set}" && (emul @@ -12823,15 +15025,23 @@ if test -n "${ZSH_VERSION+set}" && (emul
alias -g '${1+"$@"}'='"$@"' alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST setopt NO_GLOB_SUBST
else else
@@ -24367,7 +24378,7 @@ Index: libffi/configure
as_nl=' as_nl='
' '
export as_nl export as_nl
@@ -12831,13 +15039,7 @@ export as_nl @@ -12839,13 +15049,7 @@ export as_nl
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
@@ -24382,7 +24393,7 @@ Index: libffi/configure
as_echo='printf %s\n' as_echo='printf %s\n'
as_echo_n='printf %s' as_echo_n='printf %s'
else else
@@ -12848,7 +15050,7 @@ else @@ -12856,7 +15060,7 @@ else
as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
as_echo_n_body='eval as_echo_n_body='eval
arg=$1; arg=$1;
@@ -24391,7 +24402,7 @@ Index: libffi/configure
*"$as_nl"*) *"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl"; expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
@@ -12871,6 +15073,13 @@ if test "${PATH_SEPARATOR+set}" != set; @@ -12879,6 +15083,13 @@ if test "${PATH_SEPARATOR+set}" != set;
} }
fi fi
@@ -24405,7 +24416,7 @@ Index: libffi/configure
# IFS # IFS
# We need space, tab and new line, in precisely that order. Quoting is # We need space, tab and new line, in precisely that order. Quoting is
@@ -12880,15 +15089,15 @@ fi @@ -12888,15 +15099,15 @@ fi
IFS=" "" $as_nl" IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator. # Find who we are. Look in the path if we contain no directory separator.
@@ -24424,7 +24435,7 @@ Index: libffi/configure
IFS=$as_save_IFS IFS=$as_save_IFS
;; ;;
@@ -12900,16 +15109,12 @@ if test "x$as_myself" = x; then @@ -12908,16 +15119,12 @@ if test "x$as_myself" = x; then
fi fi
if test ! -f "$as_myself"; then if test ! -f "$as_myself"; then
$as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
@@ -24445,7 +24456,7 @@ Index: libffi/configure
done done
PS1='$ ' PS1='$ '
PS2='> ' PS2='> '
@@ -12921,89 +15126,7 @@ export LC_ALL @@ -12929,89 +15136,7 @@ export LC_ALL
LANGUAGE=C LANGUAGE=C
export LANGUAGE export LANGUAGE
@@ -24536,7 +24547,7 @@ Index: libffi/configure
if expr a : '\(a\)' >/dev/null 2>&1 && if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr as_expr=expr
@@ -13017,12 +15140,8 @@ else @@ -13025,12 +15150,8 @@ else
as_basename=false as_basename=false
fi fi
@@ -24550,7 +24561,7 @@ Index: libffi/configure
as_me=`$as_basename -- "$0" || as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(//\)$' \| \
@@ -13042,25 +15161,76 @@ $as_echo X/"$0" | @@ -13050,25 +15171,76 @@ $as_echo X/"$0" |
} }
s/.*/./; q'` s/.*/./; q'`
@@ -24638,7 +24649,7 @@ Index: libffi/configure
rm -f conf$$ conf$$.exe conf$$.file rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then if test -d conf$$.dir; then
@@ -13089,56 +15259,8 @@ fi @@ -13097,56 +15269,8 @@ fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null rmdir conf$$.dir 2>/dev/null
@@ -24696,7 +24707,7 @@ Index: libffi/configure
else else
test -d ./-p && rmdir ./-p test -d ./-p && rmdir ./-p
as_mkdir_p=false as_mkdir_p=false
@@ -13157,10 +15279,10 @@ else @@ -13165,10 +15289,10 @@ else
if test -d "$1"; then if test -d "$1"; then
test -d "$1/."; test -d "$1/.";
else else
@@ -24709,7 +24720,7 @@ Index: libffi/configure
???[sx]*):;;*)false;;esac;fi ???[sx]*):;;*)false;;esac;fi
'\'' sh '\'' sh
' '
@@ -13175,19 +15297,13 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr @@ -13183,19 +15307,13 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr
exec 6>&1 exec 6>&1
@@ -24727,12 +24738,12 @@ Index: libffi/configure
ac_log=" ac_log="
-This file was extended by libffi $as_me 3.0.8, which was -This file was extended by libffi $as_me 3.0.8, which was
-generated by GNU Autoconf 2.64. Invocation command line was -generated by GNU Autoconf 2.64. Invocation command line was
+This file was extended by libffi $as_me 3.0.9rc11, which was +This file was extended by libffi $as_me 3.0.9rc12, which was
+generated by GNU Autoconf 2.63. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_HEADERS = $CONFIG_HEADERS
@@ -13220,11 +15336,10 @@ _ACEOF @@ -13228,11 +15346,10 @@ _ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\ ac_cs_usage="\
@@ -24747,7 +24758,7 @@ Index: libffi/configure
-h, --help print this help, then exit -h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit -V, --version print version number and configuration settings, then exit
@@ -13249,16 +15364,16 @@ $config_links @@ -13257,16 +15374,16 @@ $config_links
Configuration commands: Configuration commands:
$config_commands $config_commands
@@ -24759,7 +24770,7 @@ Index: libffi/configure
ac_cs_version="\\ ac_cs_version="\\
-libffi config.status 3.0.8 -libffi config.status 3.0.8
-configured by $0, generated by GNU Autoconf 2.64, -configured by $0, generated by GNU Autoconf 2.64,
+libffi config.status 3.0.9rc11 +libffi config.status 3.0.9rc12
+configured by $0, generated by GNU Autoconf 2.63, +configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -24768,7 +24779,7 @@ Index: libffi/configure
This config.status script is free software; the Free Software Foundation This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it." gives unlimited permission to copy, distribute and modify it."
@@ -13301,19 +15416,20 @@ do @@ -13309,19 +15426,20 @@ do
case $ac_optarg in case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac esac
@@ -24793,7 +24804,7 @@ Index: libffi/configure
--help | --hel | -h ) --help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;; $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
@@ -13321,10 +15437,11 @@ Try \`$0 --help' for more information."; @@ -13329,10 +15447,11 @@ Try \`$0 --help' for more information.";
ac_cs_silent=: ;; ac_cs_silent=: ;;
# This is an error. # This is an error.
@@ -24808,7 +24819,7 @@ Index: libffi/configure
ac_need_defaults=false ;; ac_need_defaults=false ;;
esac esac
@@ -13365,20 +15482,6 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ @@ -13373,20 +15492,6 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ
# #
# INIT-COMMANDS # INIT-COMMANDS
# #
@@ -24829,7 +24840,7 @@ Index: libffi/configure
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
@@ -13389,143 +15492,131 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac @@ -13397,143 +15502,131 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac
sed_quote_subst='$sed_quote_subst' sed_quote_subst='$sed_quote_subst'
double_quote_subst='$double_quote_subst' double_quote_subst='$double_quote_subst'
delay_variable_subst='$delay_variable_subst' delay_variable_subst='$delay_variable_subst'
@@ -25092,7 +25103,7 @@ Index: libffi/configure
GREP \ GREP \
EGREP \ EGREP \
FGREP \ FGREP \
@@ -13549,6 +15640,8 @@ lt_cv_sys_global_symbol_pipe \ @@ -13557,6 +15650,8 @@ lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -25101,7 +25112,7 @@ Index: libffi/configure
lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_no_builtin_flag \
lt_prog_compiler_wl \ lt_prog_compiler_wl \
lt_prog_compiler_pic \ lt_prog_compiler_pic \
@@ -13578,13 +15671,12 @@ variables_saved_for_relink \ @@ -13586,13 +15681,12 @@ variables_saved_for_relink \
libname_spec \ libname_spec \
library_names_spec \ library_names_spec \
soname_spec \ soname_spec \
@@ -25117,7 +25128,7 @@ Index: libffi/configure
;; ;;
*) *)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -13611,9 +15703,9 @@ postuninstall_cmds \ @@ -13619,9 +15713,9 @@ postuninstall_cmds \
finish_cmds \ finish_cmds \
sys_lib_search_path_spec \ sys_lib_search_path_spec \
sys_lib_dlsearch_path_spec; do sys_lib_dlsearch_path_spec; do
@@ -25129,7 +25140,7 @@ Index: libffi/configure
;; ;;
*) *)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -13621,6 +15713,12 @@ sys_lib_dlsearch_path_spec; do @@ -13629,6 +15723,12 @@ sys_lib_dlsearch_path_spec; do
esac esac
done done
@@ -25142,7 +25153,7 @@ Index: libffi/configure
ac_aux_dir='$ac_aux_dir' ac_aux_dir='$ac_aux_dir'
xsi_shell='$xsi_shell' xsi_shell='$xsi_shell'
lt_shell_append='$lt_shell_append' lt_shell_append='$lt_shell_append'
@@ -13651,7 +15749,6 @@ for ac_config_target in $ac_config_targe @@ -13659,7 +15759,6 @@ for ac_config_target in $ac_config_targe
do do
case $ac_config_target in case $ac_config_target in
"fficonfig.h") CONFIG_HEADERS="$CONFIG_HEADERS fficonfig.h" ;; "fficonfig.h") CONFIG_HEADERS="$CONFIG_HEADERS fficonfig.h" ;;
@@ -25150,7 +25161,7 @@ Index: libffi/configure
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
"include") CONFIG_COMMANDS="$CONFIG_COMMANDS include" ;; "include") CONFIG_COMMANDS="$CONFIG_COMMANDS include" ;;
@@ -13662,8 +15759,11 @@ do @@ -13670,8 +15769,11 @@ do
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
@@ -25163,7 +25174,7 @@ Index: libffi/configure
esac esac
done done
@@ -13691,7 +15791,7 @@ $debug || @@ -13699,7 +15801,7 @@ $debug ||
trap 'exit_status=$? trap 'exit_status=$?
{ test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
' 0 ' 0
@@ -25172,7 +25183,7 @@ Index: libffi/configure
} }
# Create a (secure) tmp directory for tmp files. # Create a (secure) tmp directory for tmp files.
@@ -13702,7 +15802,11 @@ $debug || @@ -13710,7 +15812,11 @@ $debug ||
{ {
tmp=./conf$$-$RANDOM tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp") (umask 077 && mkdir "$tmp")
@@ -25185,7 +25196,7 @@ Index: libffi/configure
# Set up the scripts for CONFIG_FILES section. # Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES. # No need to generate them if there are no CONFIG_FILES.
@@ -13710,16 +15814,10 @@ $debug || @@ -13718,16 +15824,10 @@ $debug ||
if test -n "$CONFIG_FILES"; then if test -n "$CONFIG_FILES"; then
@@ -25204,7 +25215,7 @@ Index: libffi/configure
else else
ac_cs_awk_cr=$ac_cr ac_cs_awk_cr=$ac_cr
fi fi
@@ -13733,18 +15831,24 @@ _ACEOF @@ -13741,18 +15841,24 @@ _ACEOF
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF" echo "_ACEOF"
} >conf$$subs.sh || } >conf$$subs.sh ||
@@ -25232,7 +25243,7 @@ Index: libffi/configure
else else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! " ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi fi
@@ -13833,7 +15937,9 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n @@ -13841,7 +15947,9 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n
else else
cat cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
@@ -25243,7 +25254,7 @@ Index: libffi/configure
_ACEOF _ACEOF
# VPATH may cause trouble with some makes, so we remove $(srcdir), # VPATH may cause trouble with some makes, so we remove $(srcdir),
@@ -13874,7 +15980,9 @@ for ac_last_try in false false :; do @@ -13882,7 +15990,9 @@ for ac_last_try in false false :; do
if test -z "$ac_t"; then if test -z "$ac_t"; then
break break
elif $ac_last_try; then elif $ac_last_try; then
@@ -25254,7 +25265,7 @@ Index: libffi/configure
else else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! " ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi fi
@@ -13959,7 +16067,9 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ @@ -13967,7 +16077,9 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ
_ACAWK _ACAWK
_ACEOF _ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
@@ -25265,7 +25276,7 @@ Index: libffi/configure
fi # test -n "$CONFIG_HEADERS" fi # test -n "$CONFIG_HEADERS"
@@ -13972,7 +16082,9 @@ do @@ -13980,7 +16092,9 @@ do
esac esac
case $ac_mode$ac_tag in case $ac_mode$ac_tag in
:[FHL]*:*);; :[FHL]*:*);;
@@ -25276,7 +25287,7 @@ Index: libffi/configure
:[FH]-) ac_tag=-:-;; :[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac esac
@@ -14000,10 +16112,12 @@ do @@ -14008,10 +16122,12 @@ do
[\\/$]*) false;; [\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac || esac ||
@@ -25291,7 +25302,7 @@ Index: libffi/configure
done done
# Let's still pretend it is `configure' which instantiates (i.e., don't # Let's still pretend it is `configure' which instantiates (i.e., don't
@@ -14014,7 +16128,7 @@ do @@ -14022,7 +16138,7 @@ do
`' by configure.' `' by configure.'
if test x"$ac_file" != x-; then if test x"$ac_file" != x-; then
configure_input="$ac_file. $configure_input" configure_input="$ac_file. $configure_input"
@@ -25300,7 +25311,7 @@ Index: libffi/configure
$as_echo "$as_me: creating $ac_file" >&6;} $as_echo "$as_me: creating $ac_file" >&6;}
fi fi
# Neutralize special characters interpreted by sed in replacement strings. # Neutralize special characters interpreted by sed in replacement strings.
@@ -14027,7 +16141,9 @@ $as_echo "$as_me: creating $ac_file" >&6 @@ -14035,7 +16151,9 @@ $as_echo "$as_me: creating $ac_file" >&6
case $ac_tag in case $ac_tag in
*:-:* | *:-) cat >"$tmp/stdin" \ *:-:* | *:-) cat >"$tmp/stdin" \
@@ -25311,7 +25322,7 @@ Index: libffi/configure
esac esac
;; ;;
esac esac
@@ -14055,7 +16171,47 @@ $as_echo X"$ac_file" | @@ -14063,7 +16181,47 @@ $as_echo X"$ac_file" |
q q
} }
s/.*/./; q'` s/.*/./; q'`
@@ -25360,7 +25371,7 @@ Index: libffi/configure
ac_builddir=. ac_builddir=.
case "$ac_dir" in case "$ac_dir" in
@@ -14112,6 +16268,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri @@ -14120,6 +16278,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
# If the template does not know about datarootdir, expand it. # If the template does not know about datarootdir, expand it.
# FIXME: This hack should be removed a few years after 2.60. # FIXME: This hack should be removed a few years after 2.60.
ac_datarootdir_hack=; ac_datarootdir_seen= ac_datarootdir_hack=; ac_datarootdir_seen=
@@ -25368,7 +25379,7 @@ Index: libffi/configure
ac_sed_dataroot=' ac_sed_dataroot='
/datarootdir/ { /datarootdir/ {
p p
@@ -14121,11 +16278,12 @@ ac_sed_dataroot=' @@ -14129,11 +16288,12 @@ ac_sed_dataroot='
/@docdir@/p /@docdir@/p
/@infodir@/p /@infodir@/p
/@localedir@/p /@localedir@/p
@@ -25383,7 +25394,7 @@ Index: libffi/configure
$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
_ACEOF _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
@@ -14135,7 +16293,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ @@ -14143,7 +16303,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ
s&@infodir@&$infodir&g s&@infodir@&$infodir&g
s&@localedir@&$localedir&g s&@localedir@&$localedir&g
s&@mandir@&$mandir&g s&@mandir@&$mandir&g
@@ -25392,7 +25403,7 @@ Index: libffi/configure
esac esac
_ACEOF _ACEOF
@@ -14164,12 +16322,14 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t @@ -14172,12 +16332,14 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack $ac_datarootdir_hack
" "
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
@@ -25409,7 +25420,7 @@ Index: libffi/configure
which seems to be undefined. Please make sure it is defined." >&5 which seems to be undefined. Please make sure it is defined." >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined." >&2;} which seems to be undefined. Please make sure it is defined." >&2;}
@@ -14179,7 +16339,9 @@ which seems to be undefined. Please mak @@ -14187,7 +16349,9 @@ which seems to be undefined. Please mak
-) cat "$tmp/out" && rm -f "$tmp/out";; -) cat "$tmp/out" && rm -f "$tmp/out";;
*) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
esac \ esac \
@@ -25420,7 +25431,7 @@ Index: libffi/configure
;; ;;
:H) :H)
# #
@@ -14190,19 +16352,25 @@ which seems to be undefined. Please mak @@ -14198,19 +16362,25 @@ which seems to be undefined. Please mak
$as_echo "/* $configure_input */" \ $as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
} >"$tmp/config.h" \ } >"$tmp/config.h" \
@@ -25450,7 +25461,7 @@ Index: libffi/configure
fi fi
# Compute "$ac_file"'s index in $config_headers. # Compute "$ac_file"'s index in $config_headers.
_am_arg="$ac_file" _am_arg="$ac_file"
@@ -14252,11 +16420,13 @@ $as_echo X"$_am_arg" | @@ -14260,11 +16430,13 @@ $as_echo X"$_am_arg" |
ac_source=$srcdir/$ac_source ac_source=$srcdir/$ac_source
fi fi
@@ -25466,7 +25477,7 @@ Index: libffi/configure
fi fi
rm -f "$ac_file" rm -f "$ac_file"
@@ -14268,24 +16438,18 @@ $as_echo "$as_me: linking $ac_source to @@ -14276,24 +16448,18 @@ $as_echo "$as_me: linking $ac_source to
ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
ln "$ac_source" "$ac_file" 2>/dev/null || ln "$ac_source" "$ac_file" 2>/dev/null ||
cp -p "$ac_source" "$ac_file" || cp -p "$ac_source" "$ac_file" ||
@@ -25495,7 +25506,7 @@ Index: libffi/configure
"depfiles":C) test x"$AMDEP_TRUE" != x"" || { "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
# Autoconf 2.62 quotes --file arguments for eval, but not when files # Autoconf 2.62 quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval # are listed without --file. Let's play safe and only enable the eval
@@ -14374,7 +16538,47 @@ $as_echo X"$file" | @@ -14382,7 +16548,47 @@ $as_echo X"$file" |
q q
} }
s/.*/./; q'` s/.*/./; q'`
@@ -25544,7 +25555,7 @@ Index: libffi/configure
# echo "creating $dirpart/$file" # echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file" echo '# dummy' > "$dirpart/$file"
done done
@@ -14402,7 +16606,7 @@ $as_echo X"$file" | @@ -14410,7 +16616,7 @@ $as_echo X"$file" |
# NOTE: Changes made to this file will be lost: look at ltmain.sh. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
# #
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -25553,7 +25564,7 @@ Index: libffi/configure
# Written by Gordon Matzigkeit, 1996 # Written by Gordon Matzigkeit, 1996
# #
# This file is part of GNU Libtool. # This file is part of GNU Libtool.
@@ -14450,12 +16654,6 @@ pic_mode=$pic_mode @@ -14458,12 +16664,6 @@ pic_mode=$pic_mode
# Whether or not to optimize for fast installation. # Whether or not to optimize for fast installation.
fast_install=$enable_fast_install fast_install=$enable_fast_install
@@ -25566,7 +25577,7 @@ Index: libffi/configure
# The host system. # The host system.
host_alias=$host_alias host_alias=$host_alias
host=$host host=$host
@@ -14505,6 +16703,10 @@ SP2NL=$lt_lt_SP2NL @@ -14513,6 +16713,10 @@ SP2NL=$lt_lt_SP2NL
# turn newlines into spaces. # turn newlines into spaces.
NL2SP=$lt_lt_NL2SP NL2SP=$lt_lt_NL2SP
@@ -25577,7 +25588,7 @@ Index: libffi/configure
# An object symbol dumper. # An object symbol dumper.
OBJDUMP=$lt_OBJDUMP OBJDUMP=$lt_OBJDUMP
@@ -14526,9 +16728,6 @@ RANLIB=$lt_RANLIB @@ -14534,9 +16738,6 @@ RANLIB=$lt_RANLIB
old_postinstall_cmds=$lt_old_postinstall_cmds old_postinstall_cmds=$lt_old_postinstall_cmds
old_postuninstall_cmds=$lt_old_postuninstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds
@@ -25587,7 +25598,7 @@ Index: libffi/configure
# A C compiler. # A C compiler.
LTCC=$lt_CC LTCC=$lt_CC
@@ -14550,6 +16749,12 @@ global_symbol_to_c_name_address_lib_pref @@ -14558,6 +16759,12 @@ global_symbol_to_c_name_address_lib_pref
# The name of the directory that contains temporary libtool files. # The name of the directory that contains temporary libtool files.
objdir=$objdir objdir=$objdir
@@ -25600,7 +25611,7 @@ Index: libffi/configure
# Used to examine libraries when file_magic_cmd begins with "file". # Used to examine libraries when file_magic_cmd begins with "file".
MAGIC_CMD=$MAGIC_CMD MAGIC_CMD=$MAGIC_CMD
@@ -14612,9 +16817,6 @@ library_names_spec=$lt_library_names_spe @@ -14620,9 +16827,6 @@ library_names_spec=$lt_library_names_spe
# The coded name of the library, if different from the real name. # The coded name of the library, if different from the real name.
soname_spec=$lt_soname_spec soname_spec=$lt_soname_spec
@@ -25610,7 +25621,7 @@ Index: libffi/configure
# Command to use after installation of a shared archive. # Command to use after installation of a shared archive.
postinstall_cmds=$lt_postinstall_cmds postinstall_cmds=$lt_postinstall_cmds
@@ -14654,10 +16856,6 @@ striplib=$lt_striplib @@ -14662,10 +16866,6 @@ striplib=$lt_striplib
# The linker used to build libraries. # The linker used to build libraries.
LD=$lt_LD LD=$lt_LD
@@ -25621,7 +25632,7 @@ Index: libffi/configure
# Commands used to build an old-style archive. # Commands used to build an old-style archive.
old_archive_cmds=$lt_old_archive_cmds old_archive_cmds=$lt_old_archive_cmds
@@ -14917,7 +17115,7 @@ _LT_EOF @@ -14925,7 +17125,7 @@ _LT_EOF
func_dirname () func_dirname ()
{ {
# Extract subdirectory from the argument. # Extract subdirectory from the argument.
@@ -25630,7 +25641,7 @@ Index: libffi/configure
if test "X$func_dirname_result" = "X${1}"; then if test "X$func_dirname_result" = "X${1}"; then
func_dirname_result="${3}" func_dirname_result="${3}"
else else
@@ -14928,7 +17126,7 @@ func_dirname () @@ -14936,7 +17136,7 @@ func_dirname ()
# func_basename file # func_basename file
func_basename () func_basename ()
{ {
@@ -25639,7 +25650,7 @@ Index: libffi/configure
} }
@@ -14941,8 +17139,10 @@ func_basename () @@ -14949,8 +17149,10 @@ func_basename ()
func_stripname () func_stripname ()
{ {
case ${2} in case ${2} in
@@ -25652,7 +25663,7 @@ Index: libffi/configure
esac esac
} }
@@ -14953,20 +17153,20 @@ my_sed_long_arg='1s/^-[^=]*=//' @@ -14961,20 +17163,20 @@ my_sed_long_arg='1s/^-[^=]*=//'
# func_opt_split # func_opt_split
func_opt_split () func_opt_split ()
{ {
@@ -25677,7 +25688,7 @@ Index: libffi/configure
} }
# func_arith arithmetic-term... # func_arith arithmetic-term...
@@ -15030,12 +17230,15 @@ test -d src/$TARGETDIR || mkdir src/$TAR @@ -15038,12 +17240,15 @@ test -d src/$TARGETDIR || mkdir src/$TAR
done # for ac_tag done # for ac_tag
@@ -25695,7 +25706,7 @@ Index: libffi/configure
# configure is writing to config.log, and then calls config.status. # configure is writing to config.log, and then calls config.status.
@@ -15056,10 +17259,10 @@ if test "$no_create" != yes; then @@ -15064,10 +17269,10 @@ if test "$no_create" != yes; then
exec 5>>config.log exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which # Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction. # would make configure fail if this is the last instruction.
@@ -25719,7 +25730,7 @@ Index: libffi/configure.ac
+AC_PREREQ(2.63) +AC_PREREQ(2.63)
-AC_INIT([libffi], [3.0.8], [http://gcc.gnu.org/bugs.html]) -AC_INIT([libffi], [3.0.8], [http://gcc.gnu.org/bugs.html])
+AC_INIT([libffi], [3.0.9rc11], [http://gcc.gnu.org/bugs.html]) +AC_INIT([libffi], [3.0.9rc12], [http://gcc.gnu.org/bugs.html])
AC_CONFIG_HEADERS([fficonfig.h]) AC_CONFIG_HEADERS([fficonfig.h])
-AM_ENABLE_MULTILIB(, ..) -AM_ENABLE_MULTILIB(, ..)
@@ -25754,7 +25765,7 @@ Index: libffi/configure.ac
;; ;;
avr32*-*-*) avr32*-*-*)
@@ -386,6 +389,6 @@ test -d src/$TARGETDIR || mkdir src/$TAR @@ -394,6 +397,6 @@ test -d src/$TARGETDIR || mkdir src/$TAR
AC_CONFIG_LINKS(include/ffitarget.h:src/$TARGETDIR/ffitarget.h) AC_CONFIG_LINKS(include/ffitarget.h:src/$TARGETDIR/ffitarget.h)
@@ -26378,7 +26389,7 @@ Index: libffi/include/Makefile.in
CONFIG_HEADER = $(top_builddir)/fficonfig.h CONFIG_HEADER = $(top_builddir)/fficonfig.h
CONFIG_CLEAN_FILES = ffi.h ffitarget.h CONFIG_CLEAN_FILES = ffi.h ffitarget.h
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
@@ -76,8 +70,8 @@ am__nobase_list = $(am__nobase_strip_set @@ -76,14 +70,15 @@ am__nobase_list = $(am__nobase_strip_set
am__base_list = \ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
@@ -26389,7 +26400,14 @@ Index: libffi/include/Makefile.in
ETAGS = etags ETAGS = etags
CTAGS = ctags CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -138,7 +132,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_LTLDFLAGS = @AM_LTLDFLAGS@
AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -138,7 +133,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -26397,7 +26415,7 @@ Index: libffi/include/Makefile.in
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@@ -185,9 +178,9 @@ libdir = @libdir@ @@ -185,9 +179,9 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
@@ -26408,7 +26426,7 @@ Index: libffi/include/Makefile.in
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@ pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
@@ -210,11 +203,8 @@ top_srcdir = @top_srcdir@ @@ -210,11 +204,8 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
DISTCLEANFILES = ffitarget.h DISTCLEANFILES = ffitarget.h
EXTRA_DIST = ffi.h.in ffi_common.h EXTRA_DIST = ffi.h.in ffi_common.h
@@ -26422,7 +26440,7 @@ Index: libffi/include/Makefile.in
all: all-am all: all-am
.SUFFIXES: .SUFFIXES:
@@ -256,26 +246,26 @@ mostlyclean-libtool: @@ -256,26 +247,26 @@ mostlyclean-libtool:
clean-libtool: clean-libtool:
-rm -rf .libs _libs -rm -rf .libs _libs
@@ -26458,7 +26476,7 @@ Index: libffi/include/Makefile.in
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -363,7 +353,7 @@ check-am: all-am @@ -363,7 +354,7 @@ check-am: all-am
check: check-am check: check-am
all-am: Makefile $(HEADERS) all-am: Makefile $(HEADERS)
installdirs: installdirs:
@@ -26467,7 +26485,7 @@ Index: libffi/include/Makefile.in
test -z "$$dir" || $(MKDIR_P) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-am install: install-am
@@ -412,7 +402,7 @@ info: info-am @@ -412,7 +403,7 @@ info: info-am
info-am: info-am:
@@ -26476,7 +26494,7 @@ Index: libffi/include/Makefile.in
install-dvi: install-dvi-am install-dvi: install-dvi-am
@@ -456,7 +446,7 @@ ps: ps-am @@ -456,7 +447,7 @@ ps: ps-am
ps-am: ps-am:
@@ -26485,7 +26503,7 @@ Index: libffi/include/Makefile.in
.MAKE: install-am install-strip .MAKE: install-am install-strip
@@ -466,13 +456,12 @@ uninstall-am: uninstall-toollibffiHEADER @@ -466,13 +457,12 @@ uninstall-am: uninstall-toollibffiHEADER
html-am info info-am install install-am install-data \ html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \ install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \ install-exec-am install-html install-html-am install-info \
@@ -35317,7 +35335,15 @@ Index: libffi/man/Makefile.in
CONFIG_HEADER = $(top_builddir)/fficonfig.h CONFIG_HEADER = $(top_builddir)/fficonfig.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
@@ -136,7 +130,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -82,6 +76,7 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCE
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_LTLDFLAGS = @AM_LTLDFLAGS@
AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -136,7 +131,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -35325,7 +35351,7 @@ Index: libffi/man/Makefile.in
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@@ -183,9 +176,9 @@ libdir = @libdir@ @@ -183,9 +177,9 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
@@ -35931,7 +35957,15 @@ Index: libffi/testsuite/Makefile.in
CONFIG_HEADER = $(top_builddir)/fficonfig.h CONFIG_HEADER = $(top_builddir)/fficonfig.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
@@ -113,7 +107,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -59,6 +53,7 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCE
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
+AM_LTLDFLAGS = @AM_LTLDFLAGS@
AM_RUNTESTFLAGS =
AR = @AR@
AUTOCONF = @AUTOCONF@
@@ -113,7 +108,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -35939,7 +35973,7 @@ Index: libffi/testsuite/Makefile.in
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@@ -160,9 +153,9 @@ libdir = @libdir@ @@ -160,9 +154,9 @@ libdir = @libdir@
libexecdir = @libexecdir@ libexecdir = @libexecdir@
localedir = @localedir@ localedir = @localedir@
localstatedir = @localstatedir@ localstatedir = @localstatedir@
@@ -35950,7 +35984,7 @@ Index: libffi/testsuite/Makefile.in
oldincludedir = @oldincludedir@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@ pdfdir = @pdfdir@
prefix = @prefix@ prefix = @prefix@
@@ -194,6 +187,70 @@ RUNTEST = `if [ -f $(top_srcdir)/../deja @@ -194,6 +188,70 @@ RUNTEST = `if [ -f $(top_srcdir)/../deja
else echo runtest; fi` else echo runtest; fi`
CLEANFILES = *.exe core* *.log *.sum CLEANFILES = *.exe core* *.log *.sum
@@ -43653,23 +43687,168 @@ Index: libffi/README
page for updates: <URL:http://sourceware.org/libffi/>. page for updates: <URL:http://sourceware.org/libffi/>.
@@ -166,6 +163,16 @@ arguments' test). @@ -42,41 +39,56 @@ between the two languages.
History Supported Platforms
======= ===================
+See the ChangeLog files for details. -Libffi has been ported to many different platforms, although this
-release was only tested on:
-
- arm oabi linux
- arm eabi linux
- hppa linux
- mips o32 linux (little endian)
- powerpc darwin
- powerpc freebsd
- powerpc64 linux
- sparc solaris
- sparc64 freebsd
- sparc64 solaris
- x86 cygwin
- x86 darwin
- x86 freebsd
- x86 linux
- x86 openbsd
- x86 solaris
- x86-64 mingw
- x86-64 darwin
- x86-64 linux
- x86-64 OS X
- x86-64 freebsd
- x86-64 solaris
+Libffi has been ported to many different platforms.
+For specific configuration details and testing status, please
+refer to the wiki page here:
+ +
+ http://www.moxielogic.org/wiki/index.php?title=Libffi_3.0.9
+
+At the time of release, the following basic configurations have been
+tested:
+
+|--------------+------------------|
+| Architecture | Operating System |
+|--------------+------------------|
+| Alpha | Linux |
+| ARM | Linux |
+| AVR32 | Linux |
+| HPPA | HPUX |
+| IA-64 | Linux |
+| MIPS | IRIX |
+| MIPS | Linux |
+| MIPS64 | Linux |
+| PowerPC | Linux |
+| PowerPC | Mac OSX |
+| PowerPC | FreeBSD |
+| PowerPC64 | Linux |
+| S390 | Linux |
+| S390X | Linux |
+| SPARC | Linux |
+| SPARC | Solaris |
+| SPARC64 | Linux |
+| SPARC64 | FreeBSD |
+| X86 | FreeBSD |
+| X86 | kFreeBSD |
+| X86 | Linux |
+| X86 | Mac OSX |
+| X86 | OpenBSD |
+| X86 | Solaris |
+| X86 | Windows/Cygwin |
+| X86 | Windows/MingW |
+| X86-64 | FreeBSD |
+| X86-64 | Linux |
+| X86-64 | OpenBSD |
+|--------------+------------------|
Please send additional platform test results to
-libffi-discuss@sourceware.org.
+libffi-discuss@sourceware.org and feel free to update the wiki page
+above.
Installing libffi
=================
-[Note: before actually performing any of these installation steps,
- you may wish to read the "Platform Specific Notes" below.]
-
First you must configure the distribution for your particular
system. Go to the directory you wish to build libffi in and run the
"configure" program found in the root directory of the libffi source
@@ -106,65 +118,19 @@ This will require that you have DejaGNU
To install the library and header files, type "make install".
-Platform Specific Notes
-=======================
-
- MIPS - Irix 5.3 & 6.x
- ---------------------
-
-Irix 6.2 and better supports three different calling conventions: o32,
-n32 and n64. Currently, libffi only supports both o32 and n32 under
-Irix 6.x, but only o32 under Irix 5.3. Libffi will automatically be
-configured for whichever calling convention it was built for.
-
-By default, the configure script will try to build libffi with the GNU
-development tools. To build libffi with the SGI development tools, set
-the environment variable CC to either "cc -32" or "cc -n32" before
-running configure under Irix 6.x (depending on whether you want an o32
-or n32 library), or just "cc" for Irix 5.3.
-
-With the n32 calling convention, when returning structures smaller
-than 16 bytes, be sure to provide an RVALUE that is 8 byte aligned.
-Here's one way of forcing this:
-
- double struct_storage[2];
- my_small_struct *s = (my_small_struct *) struct_storage;
- /* Use s for RVALUE */
-
-If you don't do this you are liable to get spurious bus errors.
-
-"long long" values are not supported yet.
-
-You must use GNU Make to build libffi on SGI platforms.
-
-
- PowerPC System V ABI
- --------------------
-
-There are two `System V ABI's which libffi implements for PowerPC.
-They differ only in how small structures are returned from functions.
-
-In the FFI_SYSV version, structures that are 8 bytes or smaller are
-returned in registers. This is what GCC does when it is configured
-for solaris, and is what the System V ABI I have (dated September
-1995) says.
-
-In the FFI_GCC_SYSV version, all structures are returned the same way:
-by passing a pointer as the first argument to the function. This is
-what GCC does when it is configured for linux or a generic sysv
-target.
+History
+=======
-EGCS 1.0.1 (and probably other versions of EGCS/GCC) also has a
-inconsistency with the SysV ABI: When a procedure is called with many
-floating-point arguments, some of them get put on the stack. They are
-all supposed to be stored in double-precision format, even if they are
-only single-precision, but EGCS stores single-precision arguments as
-single-precision anyway. This causes one test to fail (the `many
-arguments' test).
+See the ChangeLog files for details.
+3.0.9 Dec-xx-09 +3.0.9 Dec-xx-09
+ Add AVR32 and win64 ports. Add ARM softfp support. + Add AVR32 and win64 ports. Add ARM softfp support.
+ Many fixes for AIX, Solaris, HP-UX, *BSD. + Many fixes for AIX, Solaris, HP-UX, *BSD.
+ Fix x86-64 closure bug. + Fix x86-64 closure bug.
+ + Build DLL for windows.
-History
-=======
+3.0.8 Dec-19-08 +3.0.8 Dec-19-08
+ Add *BSD, BeOS, and PA-Linux support. + Add *BSD, BeOS, and PA-Linux support.
+
3.0.7 Nov-11-08 3.0.7 Nov-11-08
Fix for ppc FreeBSD. Fix for ppc FreeBSD.
(thanks to Andreas Tobler)
Index: libffi/testsuite/Makefile.am Index: libffi/testsuite/Makefile.am
=================================================================== ===================================================================
--- libffi.orig/testsuite/Makefile.am --- libffi.orig/testsuite/Makefile.am

View File

@@ -9,9 +9,9 @@ Index: libffi/ChangeLog.libffi
+ * configure: Rebuilt. + * configure: Rebuilt.
+ * fficonfig.h.in: Rebuilt. + * fficonfig.h.in: Rebuilt.
+ +
2009-12-25 Carlo Bramini <carlo.bramix@libero.it> 2009-12-29 Kay Tietz <ktietz70@googlemail.com>
* configure.ac (AM_LTLDFLAGS): Define for windows hosts. * testsuite/libffi.call/ffitest.h,
Index: libffi/configure Index: libffi/configure
=================================================================== ===================================================================
--- libffi.orig/configure --- libffi.orig/configure

View File

@@ -2,7 +2,13 @@ Index: libffi/ChangeLog.libffi
=================================================================== ===================================================================
--- libffi.orig/ChangeLog.libffi --- libffi.orig/ChangeLog.libffi
+++ libffi/ChangeLog.libffi +++ libffi/ChangeLog.libffi
@@ -1,3 +1,10 @@ @@ -1,3 +1,16 @@
+2009-12-29 Kay Tietz <ktietz70@googlemail.com>
+
+ * testsuite/libffi.call/ffitest.h,
+ testsuite/libffi.special/ffitestcxx.h (PRIdLL, PRuLL): Fix
+ definitions.
+
+2009-12-25 Carlo Bramini <carlo.bramix@libero.it> +2009-12-25 Carlo Bramini <carlo.bramix@libero.it>
+ +
+ * configure.ac (AM_LTLDFLAGS): Define for windows hosts. + * configure.ac (AM_LTLDFLAGS): Define for windows hosts.
@@ -197,3 +203,37 @@ Index: libffi/Makefile.in
AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
AM_CCASFLAGS = $(AM_CPPFLAGS) AM_CCASFLAGS = $(AM_CPPFLAGS)
all: fficonfig.h all: fficonfig.h
Index: libffi/testsuite/libffi.call/ffitest.h
===================================================================
--- libffi.orig/testsuite/libffi.call/ffitest.h
+++ libffi/testsuite/libffi.call/ffitest.h
@@ -46,9 +46,9 @@
#endif
/* MinGW kludge. */
-#ifdef WIN64
-#define PRIdLL "PRId64"
-#define PRIuLL "PRIu64"
+#ifdef _WIN64
+#define PRIdLL "I64d"
+#define PRIuLL "I64u"
#else
#define PRIdLL "lld"
#define PRIuLL "llu"
Index: libffi/testsuite/libffi.special/ffitestcxx.h
===================================================================
--- libffi.orig/testsuite/libffi.special/ffitestcxx.h
+++ libffi/testsuite/libffi.special/ffitestcxx.h
@@ -45,9 +45,9 @@
/* MinGW kludge. */
-#ifdef WIN64
-#define PRIdLL "PRId64"
-#define PRIuLL "PRIu64"
+#ifdef _WIN64
+#define PRIdLL "I64d"
+#define PRIuLL "I64u"
#else
#define PRIdLL "lld"
#define PRIuLL "llu"

View File

@@ -1,15 +1,15 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc
2009-12-26T04:59:25.888276Z 2009-12-28T18:19:18.861565Z
155470 155492
green dje
@@ -26,10 +26,10 @@ green
138bc75d-0d04-0410-961f-82ee72b054a4 138bc75d-0d04-0410-961f-82ee72b054a4
powerpc arm
dir dir
arm powerpc
dir dir
closures.c closures.c
@@ -38,11 +38,11 @@ file
2009-12-20T06:01:56.058555Z 2009-12-29T03:43:00.566983Z
c36f20ce319c714943a9f8272a1ec6c7 51d610374f7ef5c8ca8e54c607e251d9
2009-12-10T10:09:17.074519Z 2009-12-26T18:49:55.630686Z
155124 155475
ro andreast
@@ -64,7 +64,7 @@ ro
16543 16354
m32r m32r
dir dir
@@ -72,15 +72,6 @@ dir
sh64 sh64
dir dir
m68k
dir
alpha
dir
x86
dir
types.c types.c
file file
@@ -115,19 +106,28 @@ aph
2904 2904
frv x86
dir
alpha
dir
m68k
dir dir
avr32 avr32
dir dir
frv
dir
s390 s390
dir dir
pa cris
dir dir
cris pa
dir dir
ia64 ia64

View File

@@ -50,11 +50,6 @@
executable memory. */ executable memory. */
# define FFI_MMAP_EXEC_WRIT 1 # define FFI_MMAP_EXEC_WRIT 1
# endif # endif
# if defined(X86_64) && defined(__sun__) && defined(__svr4__)
/* The data segment on 64-bit Solaris/x86 isn't executable, so use mmap
instead. */
# define FFI_MMAP_EXEC_WRIT 1
# endif
#endif #endif
#if FFI_MMAP_EXEC_WRIT && !defined FFI_MMAP_EXEC_SELINUX #if FFI_MMAP_EXEC_WRIT && !defined FFI_MMAP_EXEC_SELINUX

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/alpha svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/alpha
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/arm svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/arm
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/avr32 svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/avr32
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,5 +1,5 @@
/* ----------------------------------------------------------------------- /* -----------------------------------------------------------------------
closures.c - Copyright (c) 2007 Red Hat, Inc. closures.c - Copyright (c) 2007, 2009 Red Hat, Inc.
Copyright (C) 2007, 2009 Free Software Foundation, Inc Copyright (C) 2007, 2009 Free Software Foundation, Inc
Code to allocate and deallocate memory for closures. Code to allocate and deallocate memory for closures.

51
src/closures.c.rej Normal file
View File

@@ -0,0 +1,51 @@
--- src/closures.c
+++ src/closures.c
@@ -50,11 +50,6 @@
executable memory. */
# define FFI_MMAP_EXEC_WRIT 1
# endif
-# if defined(X86_64) && defined(__sun__) && defined(__svr4__)
-/* The data segment on 64-bit Solaris/x86 isn't executable, so use mmap
- instead. */
-# define FFI_MMAP_EXEC_WRIT 1
-# endif
#endif
#if FFI_MMAP_EXEC_WRIT && !defined FFI_MMAP_EXEC_SELINUX
@@ -214,6 +209,8 @@
#if !(defined(X86_WIN32) || defined(X86_WIN64)) || defined (__CYGWIN__)
+#if FFI_MMAP_EXEC_SELINUX
+
/* A mutex used to synchronize access to *exec* variables in this file. */
static pthread_mutex_t open_temp_exec_file_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -483,6 +480,27 @@
return dlmmap_locked (start, length, prot, flags, offset);
}
+#else
+
+static void *
+dlmmap (void *start, size_t length, int prot,
+ int flags, int fd, off_t offset)
+{
+
+ assert (start == NULL && length % malloc_getpagesize == 0
+ && prot == (PROT_READ | PROT_WRITE)
+ && flags == (MAP_PRIVATE | MAP_ANONYMOUS)
+ && fd == -1 && offset == 0);
+
+#if FFI_CLOSURE_TEST
+ printf ("mapping in %zi\n", length);
+#endif
+
+ return mmap (start, length, prot | PROT_EXEC, flags, fd, offset);
+}
+
+#endif
+
/* Release memory at the given address, as well as the corresponding
executable page if it's separate. */
static int

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/cris svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/cris
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/frv svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/frv
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/ia64 svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/ia64
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/m32r svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/m32r
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/m68k svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/m68k
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/mips svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/mips
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/pa svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/pa
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,14 +1,14 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/powerpc svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/powerpc
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc
2009-12-08T00:41:10.883117Z 2009-12-28T18:19:18.861565Z
155070 155492
dje dje
@@ -202,11 +202,11 @@ file
2009-12-20T06:01:53.730558Z 2009-12-29T03:43:00.498236Z
5e33e72fe5ecabf0a89cf4d5227cb1ca 817f588a25206791e6c66eac1d0053ef
2009-06-16T17:55:39.375944Z 2009-12-26T12:40:27.505316Z
148543 155473
andreast schwab
@@ -228,7 +228,7 @@ andreast
39006 39056
sysv.S sysv.S
file file
@@ -338,10 +338,10 @@ file
2009-12-20T06:01:53.730558Z 2009-12-29T03:43:00.515985Z
060e5d94c60a73470ae84eefddd59be0 16f90a13659a11e0db8871d655b430f8
2009-12-04T15:36:50.057287Z 2009-12-28T18:19:18.861565Z
154983 155492
dje dje
@@ -364,7 +364,7 @@ dje
24973 26077
linux64.S linux64.S
file file

View File

@@ -185,6 +185,7 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack)
{ {
*next_arg.f = (float) double_tmp; *next_arg.f = (float) double_tmp;
next_arg.u += 1; next_arg.u += 1;
intarg_count++;
} }
else else
*fpr_base.d++ = double_tmp; *fpr_base.d++ = double_tmp;
@@ -1149,6 +1150,7 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
pst++; pst++;
avalue[i] = pst; avalue[i] = pst;
pst += 2; pst += 2;
ng = 8;
} }
break; break;
@@ -1222,6 +1224,7 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
{ {
avalue[i] = pst; avalue[i] = pst;
pst += 4; pst += 4;
ng = 8;
} }
break; break;
} }

View File

@@ -32,7 +32,7 @@
#include <stdlib.h> #include <stdlib.h>
extern void ffi_closure_ASM(void); extern void ffi_closure_ASM (void);
enum { enum {
/* The assembly depends on these exact flags. */ /* The assembly depends on these exact flags. */
@@ -80,10 +80,13 @@ enum { ASM_NEEDS_REGISTERS = 4 };
*/ */
void ffi_prep_args(extended_cif *ecif, unsigned long *const stack) void
ffi_prep_args (extended_cif *ecif, unsigned long *const stack)
{ {
const unsigned bytes = ecif->cif->bytes; const unsigned bytes = ecif->cif->bytes;
const unsigned flags = ecif->cif->flags; const unsigned flags = ecif->cif->flags;
const unsigned nargs = ecif->cif->nargs;
const ffi_abi abi = ecif->cif->abi;
/* 'stacktop' points at the previous backchain pointer. */ /* 'stacktop' points at the previous backchain pointer. */
unsigned long *const stacktop = stack + (bytes / sizeof(unsigned long)); unsigned long *const stacktop = stack + (bytes / sizeof(unsigned long));
@@ -118,7 +121,7 @@ void ffi_prep_args(extended_cif *ecif, unsigned long *const stack)
*next_arg++ = (unsigned long) (char *) ecif->rvalue; *next_arg++ = (unsigned long) (char *) ecif->rvalue;
/* Now for the arguments. */ /* Now for the arguments. */
for (i = ecif->cif->nargs; i > 0; i--, ptr++, p_argv++) for (i = nargs; i > 0; i--, ptr++, p_argv++)
{ {
switch ((*ptr)->type) switch ((*ptr)->type)
{ {
@@ -213,7 +216,7 @@ void ffi_prep_args(extended_cif *ecif, unsigned long *const stack)
size_al = (*ptr)->size; size_al = (*ptr)->size;
if ((*ptr)->elements[0]->type == 3) if ((*ptr)->elements[0]->type == 3)
size_al = ALIGN((*ptr)->size, 8); size_al = ALIGN((*ptr)->size, 8);
if (size_al < 3 && ecif->cif->abi == FFI_DARWIN) if (size_al < 3 && abi == FFI_DARWIN)
dest_cpy += 4 - size_al; dest_cpy += 4 - size_al;
memcpy ((char *) dest_cpy, (char *) *p_argv, size_al); memcpy ((char *) dest_cpy, (char *) *p_argv, size_al);
@@ -229,7 +232,7 @@ void ffi_prep_args(extended_cif *ecif, unsigned long *const stack)
the struct to double-word. */ the struct to double-word. */
if ((*ptr)->elements[0]->type == FFI_TYPE_DOUBLE) if ((*ptr)->elements[0]->type == FFI_TYPE_DOUBLE)
size_al = ALIGN((*ptr)->size, 8); size_al = ALIGN((*ptr)->size, 8);
if (size_al < 3 && ecif->cif->abi == FFI_DARWIN) if (size_al < 3 && abi == FFI_DARWIN)
dest_cpy += 4 - size_al; dest_cpy += 4 - size_al;
memcpy((char *) dest_cpy, (char *) *p_argv, size_al); memcpy((char *) dest_cpy, (char *) *p_argv, size_al);
@@ -301,8 +304,44 @@ darwin_adjust_aggregate_sizes (ffi_type *s)
/* Do not add additional tail padding. */ /* Do not add additional tail padding. */
} }
/* Adjust the size of S to be correct for AIX.
Word-align double unless it is the first member of a structure. */
static void
aix_adjust_aggregate_sizes (ffi_type *s)
{
int i;
if (s->type != FFI_TYPE_STRUCT)
return;
s->size = 0;
for (i = 0; s->elements[i] != NULL; i++)
{
ffi_type *p;
int align;
p = s->elements[i];
aix_adjust_aggregate_sizes (p);
align = p->alignment;
if (i != 0 && p->type == FFI_TYPE_DOUBLE)
align = 4;
s->size = ALIGN(s->size, align) + p->size;
}
s->size = ALIGN(s->size, s->alignment);
if (s->elements[0]->type == FFI_TYPE_UINT64
|| s->elements[0]->type == FFI_TYPE_SINT64
|| s->elements[0]->type == FFI_TYPE_DOUBLE
|| s->elements[0]->alignment == 8)
s->alignment = s->alignment > 8 ? s->alignment : 8;
/* Do not add additional tail padding. */
}
/* Perform machine dependent cif processing. */ /* Perform machine dependent cif processing. */
ffi_status ffi_prep_cif_machdep(ffi_cif *cif) ffi_status
ffi_prep_cif_machdep (ffi_cif *cif)
{ {
/* All this is for the DARWIN ABI. */ /* All this is for the DARWIN ABI. */
int i; int i;
@@ -323,6 +362,13 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
darwin_adjust_aggregate_sizes (cif->arg_types[i]); darwin_adjust_aggregate_sizes (cif->arg_types[i]);
} }
if (cif->abi == FFI_AIX)
{
aix_adjust_aggregate_sizes (cif->rtype);
for (i = 0; i < cif->nargs; i++)
aix_adjust_aggregate_sizes (cif->arg_types[i]);
}
/* Space for the frame pointer, callee's LR, CR, etc, and for /* Space for the frame pointer, callee's LR, CR, etc, and for
the asm's temp regs. */ the asm's temp regs. */
@@ -473,7 +519,8 @@ extern void ffi_call_AIX(extended_cif *, long, unsigned, unsigned *,
extern void ffi_call_DARWIN(extended_cif *, long, unsigned, unsigned *, extern void ffi_call_DARWIN(extended_cif *, long, unsigned, unsigned *,
void (*fn)(void), void (*fn2)(void)); void (*fn)(void), void (*fn2)(void));
void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) void
ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
{ {
extended_cif ecif; extended_cif ecif;
@@ -486,7 +533,7 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
if ((rvalue == NULL) && if ((rvalue == NULL) &&
(cif->rtype->type == FFI_TYPE_STRUCT)) (cif->rtype->type == FFI_TYPE_STRUCT))
{ {
ecif.rvalue = alloca(cif->rtype->size); ecif.rvalue = alloca (cif->rtype->size);
} }
else else
ecif.rvalue = rvalue; ecif.rvalue = rvalue;
@@ -661,8 +708,9 @@ typedef union
double d; double d;
} ffi_dblfl; } ffi_dblfl;
int ffi_closure_helper_DARWIN (ffi_closure*, void*, int
unsigned long*, ffi_dblfl*); ffi_closure_helper_DARWIN (ffi_closure *, void *,
unsigned long *, ffi_dblfl *);
/* Basically the trampoline invokes ffi_closure_ASM, and on /* Basically the trampoline invokes ffi_closure_ASM, and on
entry, r11 holds the address of the closure. entry, r11 holds the address of the closure.
@@ -671,8 +719,9 @@ int ffi_closure_helper_DARWIN (ffi_closure*, void*,
up space for a return value, ffi_closure_ASM invokes the up space for a return value, ffi_closure_ASM invokes the
following helper function to do most of the work. */ following helper function to do most of the work. */
int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue, int
unsigned long * pgr, ffi_dblfl * pfr) ffi_closure_helper_DARWIN (ffi_closure *closure, void *rvalue,
unsigned long *pgr, ffi_dblfl *pfr)
{ {
/* rvalue is the pointer to space for return value in closure assembly /* rvalue is the pointer to space for return value in closure assembly
pgr is the pointer to where r3-r10 are stored in ffi_closure_ASM pgr is the pointer to where r3-r10 are stored in ffi_closure_ASM
@@ -694,7 +743,7 @@ int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue,
unsigned size_al; unsigned size_al;
cif = closure->cif; cif = closure->cif;
avalue = alloca(cif->nargs * sizeof(void *)); avalue = alloca (cif->nargs * sizeof(void *));
/* Copy the caller's structure return value address so that the closure /* Copy the caller's structure return value address so that the closure
returns the data directly to the caller. */ returns the data directly to the caller. */

View File

@@ -1205,6 +1205,7 @@ ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
pst++; pst++;
avalue[i] = pst; avalue[i] = pst;
pst += 2; pst += 2;
ng = 8;
} }
break; break;

18
src/powerpc/ffi.c.rej Normal file
View File

@@ -0,0 +1,18 @@
--- src/powerpc/ffi.c
+++ src/powerpc/ffi.c
@@ -186,6 +187,7 @@
{
*next_arg.f = (float) double_tmp;
next_arg.u += 1;
+ intarg_count++;
}
else
*fpr_base.d++ = double_tmp;
@@ -1224,6 +1227,7 @@
{
avalue[i] = pst;
pst += 4;
+ ng = 8;
}
break;
}

View File

@@ -32,7 +32,7 @@
#include <stdlib.h> #include <stdlib.h>
extern void ffi_closure_ASM(void); extern void ffi_closure_ASM (void);
enum { enum {
/* The assembly depends on these exact flags. */ /* The assembly depends on these exact flags. */
@@ -80,10 +80,13 @@ enum { ASM_NEEDS_REGISTERS = 4 };
*/ */
void ffi_prep_args(extended_cif *ecif, unsigned long *const stack) void
ffi_prep_args (extended_cif *ecif, unsigned long *const stack)
{ {
const unsigned bytes = ecif->cif->bytes; const unsigned bytes = ecif->cif->bytes;
const unsigned flags = ecif->cif->flags; const unsigned flags = ecif->cif->flags;
const unsigned nargs = ecif->cif->nargs;
const ffi_abi abi = ecif->cif->abi;
/* 'stacktop' points at the previous backchain pointer. */ /* 'stacktop' points at the previous backchain pointer. */
unsigned long *const stacktop = stack + (bytes / sizeof(unsigned long)); unsigned long *const stacktop = stack + (bytes / sizeof(unsigned long));
@@ -118,7 +121,7 @@ void ffi_prep_args(extended_cif *ecif, unsigned long *const stack)
*next_arg++ = (unsigned long) (char *) ecif->rvalue; *next_arg++ = (unsigned long) (char *) ecif->rvalue;
/* Now for the arguments. */ /* Now for the arguments. */
for (i = ecif->cif->nargs; i > 0; i--, ptr++, p_argv++) for (i = nargs; i > 0; i--, ptr++, p_argv++)
{ {
switch ((*ptr)->type) switch ((*ptr)->type)
{ {
@@ -213,7 +216,7 @@ void ffi_prep_args(extended_cif *ecif, unsigned long *const stack)
size_al = (*ptr)->size; size_al = (*ptr)->size;
if ((*ptr)->elements[0]->type == 3) if ((*ptr)->elements[0]->type == 3)
size_al = ALIGN((*ptr)->size, 8); size_al = ALIGN((*ptr)->size, 8);
if (size_al < 3 && ecif->cif->abi == FFI_DARWIN) if (size_al < 3 && abi == FFI_DARWIN)
dest_cpy += 4 - size_al; dest_cpy += 4 - size_al;
memcpy ((char *) dest_cpy, (char *) *p_argv, size_al); memcpy ((char *) dest_cpy, (char *) *p_argv, size_al);
@@ -229,7 +232,7 @@ void ffi_prep_args(extended_cif *ecif, unsigned long *const stack)
the struct to double-word. */ the struct to double-word. */
if ((*ptr)->elements[0]->type == FFI_TYPE_DOUBLE) if ((*ptr)->elements[0]->type == FFI_TYPE_DOUBLE)
size_al = ALIGN((*ptr)->size, 8); size_al = ALIGN((*ptr)->size, 8);
if (size_al < 3 && ecif->cif->abi == FFI_DARWIN) if (size_al < 3 && abi == FFI_DARWIN)
dest_cpy += 4 - size_al; dest_cpy += 4 - size_al;
memcpy((char *) dest_cpy, (char *) *p_argv, size_al); memcpy((char *) dest_cpy, (char *) *p_argv, size_al);
@@ -301,8 +304,44 @@ darwin_adjust_aggregate_sizes (ffi_type *s)
/* Do not add additional tail padding. */ /* Do not add additional tail padding. */
} }
/* Adjust the size of S to be correct for AIX.
Word-align double unless it is the first member of a structure. */
static void
aix_adjust_aggregate_sizes (ffi_type *s)
{
int i;
if (s->type != FFI_TYPE_STRUCT)
return;
s->size = 0;
for (i = 0; s->elements[i] != NULL; i++)
{
ffi_type *p;
int align;
p = s->elements[i];
aix_adjust_aggregate_sizes (p);
align = p->alignment;
if (i != 0 && p->type == FFI_TYPE_DOUBLE)
align = 4;
s->size = ALIGN(s->size, align) + p->size;
}
s->size = ALIGN(s->size, s->alignment);
if (s->elements[0]->type == FFI_TYPE_UINT64
|| s->elements[0]->type == FFI_TYPE_SINT64
|| s->elements[0]->type == FFI_TYPE_DOUBLE
|| s->elements[0]->alignment == 8)
s->alignment = s->alignment > 8 ? s->alignment : 8;
/* Do not add additional tail padding. */
}
/* Perform machine dependent cif processing. */ /* Perform machine dependent cif processing. */
ffi_status ffi_prep_cif_machdep(ffi_cif *cif) ffi_status
ffi_prep_cif_machdep (ffi_cif *cif)
{ {
/* All this is for the DARWIN ABI. */ /* All this is for the DARWIN ABI. */
int i; int i;
@@ -323,6 +362,13 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
darwin_adjust_aggregate_sizes (cif->arg_types[i]); darwin_adjust_aggregate_sizes (cif->arg_types[i]);
} }
if (cif->abi == FFI_AIX)
{
aix_adjust_aggregate_sizes (cif->rtype);
for (i = 0; i < cif->nargs; i++)
aix_adjust_aggregate_sizes (cif->arg_types[i]);
}
/* Space for the frame pointer, callee's LR, CR, etc, and for /* Space for the frame pointer, callee's LR, CR, etc, and for
the asm's temp regs. */ the asm's temp regs. */
@@ -473,7 +519,8 @@ extern void ffi_call_AIX(extended_cif *, long, unsigned, unsigned *,
extern void ffi_call_DARWIN(extended_cif *, long, unsigned, unsigned *, extern void ffi_call_DARWIN(extended_cif *, long, unsigned, unsigned *,
void (*fn)(void), void (*fn2)(void)); void (*fn)(void), void (*fn2)(void));
void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) void
ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
{ {
extended_cif ecif; extended_cif ecif;
@@ -486,7 +533,7 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
if ((rvalue == NULL) && if ((rvalue == NULL) &&
(cif->rtype->type == FFI_TYPE_STRUCT)) (cif->rtype->type == FFI_TYPE_STRUCT))
{ {
ecif.rvalue = alloca(cif->rtype->size); ecif.rvalue = alloca (cif->rtype->size);
} }
else else
ecif.rvalue = rvalue; ecif.rvalue = rvalue;
@@ -661,8 +708,9 @@ typedef union
double d; double d;
} ffi_dblfl; } ffi_dblfl;
int ffi_closure_helper_DARWIN (ffi_closure*, void*, int
unsigned long*, ffi_dblfl*); ffi_closure_helper_DARWIN (ffi_closure *, void *,
unsigned long *, ffi_dblfl *);
/* Basically the trampoline invokes ffi_closure_ASM, and on /* Basically the trampoline invokes ffi_closure_ASM, and on
entry, r11 holds the address of the closure. entry, r11 holds the address of the closure.
@@ -671,8 +719,9 @@ int ffi_closure_helper_DARWIN (ffi_closure*, void*,
up space for a return value, ffi_closure_ASM invokes the up space for a return value, ffi_closure_ASM invokes the
following helper function to do most of the work. */ following helper function to do most of the work. */
int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue, int
unsigned long * pgr, ffi_dblfl * pfr) ffi_closure_helper_DARWIN (ffi_closure *closure, void *rvalue,
unsigned long *pgr, ffi_dblfl *pfr)
{ {
/* rvalue is the pointer to space for return value in closure assembly /* rvalue is the pointer to space for return value in closure assembly
pgr is the pointer to where r3-r10 are stored in ffi_closure_ASM pgr is the pointer to where r3-r10 are stored in ffi_closure_ASM
@@ -694,7 +743,7 @@ int ffi_closure_helper_DARWIN (ffi_closure* closure, void * rvalue,
unsigned size_al; unsigned size_al;
cif = closure->cif; cif = closure->cif;
avalue = alloca(cif->nargs * sizeof(void *)); avalue = alloca (cif->nargs * sizeof(void *));
/* Copy the caller's structure return value address so that the closure /* Copy the caller's structure return value address so that the closure
returns the data directly to the caller. */ returns the data directly to the caller. */

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/s390 svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/s390
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/sh svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/sh
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/sh64 svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/sh64
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/sparc svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/sparc
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/x86 svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/x86
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/testsuite svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/testsuite
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/config svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/config
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/lib svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/lib
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/libffi.call svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/libffi.call
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc
@@ -60,40 +60,6 @@ aph
1707 1707
cls_align_uint16.c
file
2009-12-20T06:01:57.924804Z
8bd0cdf89201ff6da5eb8cc5af94ff4b
2009-06-12T15:57:58.721771Z
148433
aph
2524
stret_medium.c stret_medium.c
file file
@@ -128,6 +94,40 @@ daney
3814 3814
cls_align_uint16.c
file
2009-12-20T06:01:57.924804Z
8bd0cdf89201ff6da5eb8cc5af94ff4b
2009-06-12T15:57:58.721771Z
148433
aph
2524
cls_align_longdouble_split2.c cls_align_longdouble_split2.c
file file
@@ -230,40 +230,6 @@ andreast
745 745
nested_struct1.c
file
2009-12-20T06:01:57.927806Z
a3904921ab13f98414c119e2e3884079
2009-06-12T15:57:58.721771Z
148433
aph
5032
struct3.c struct3.c
file file
@@ -298,48 +264,14 @@ andreast
1220 1220
err_bad_abi.c nested_struct1.c
file file
2009-12-20T06:01:57.928805Z 2009-12-20T06:01:57.927806Z
6fd75fe5dd3edb057fdc1bf327edcd5a a3904921ab13f98414c119e2e3884079
2009-06-15T17:14:53.377358Z
148499
aph
828
nested_struct3.c
file
2009-12-20T06:01:57.928805Z
27861f3eef7acb981cb89adf5ba8317c
2009-06-12T15:57:58.721771Z 2009-06-12T15:57:58.721771Z
148433 148433
aph aph
@@ -364,7 +296,7 @@ aph
2780 5032
struct5.c struct5.c
file file
@@ -400,6 +332,74 @@ andreast
1398 1398
nested_struct3.c
file
2009-12-20T06:01:57.928805Z
27861f3eef7acb981cb89adf5ba8317c
2009-06-12T15:57:58.721771Z
148433
aph
2780
err_bad_abi.c
file
2009-12-20T06:01:57.928805Z
6fd75fe5dd3edb057fdc1bf327edcd5a
2009-06-15T17:14:53.377358Z
148499
aph
828
cls_7_1_byte.c cls_7_1_byte.c
file file
@@ -434,17 +434,17 @@ aph
3406 3406
cls_double.c struct7.c
file file
2009-12-20T06:01:57.931805Z 2009-12-20T06:01:57.929805Z
0bdb41c9d86c6676cf323baed9763580 c596ddb985689ec61b12aaa3d22affa3
2009-06-12T15:57:58.721771Z 2003-09-04T14:49:22.000000Z
148433 71069
aph andreast
@@ -466,7 +466,7 @@ aph
1081 1605
nested_struct5.c nested_struct5.c
file file
@@ -502,17 +502,17 @@ aph
2785 2785
struct7.c cls_double.c
file file
2009-12-20T06:01:57.929805Z 2009-12-20T06:01:57.931805Z
c596ddb985689ec61b12aaa3d22affa3 0bdb41c9d86c6676cf323baed9763580
2003-09-04T14:49:22.000000Z 2009-06-12T15:57:58.721771Z
71069 148433
andreast aph
@@ -534,7 +534,7 @@ andreast
1605 1081
nested_struct7.c nested_struct7.c
file file
@@ -1046,40 +1046,6 @@ aph
747 747
stret_large.c
file
2009-12-20T06:01:57.939805Z
7a756a4b99e8417f716d22e8f2339eb7
2009-12-08T22:59:02.516289Z
155093
daney
4709
cls_multi_schar.c cls_multi_schar.c
file file
@@ -1114,6 +1080,40 @@ aph
1645 1645
stret_large.c
file
2009-12-20T06:01:57.939805Z
7a756a4b99e8417f716d22e8f2339eb7
2009-12-08T22:59:02.516289Z
155093
daney
4709
cls_multi_uchar.c cls_multi_uchar.c
file file
@@ -1148,16 +1148,16 @@ aph
2279 2279
cls_9byte1.c err_bad_typedef.c
file file
2009-12-20T06:01:57.940803Z 2009-12-20T06:01:57.940803Z
40f4b4ad9bb66b5a7842f381dec87bae 3c916db09b26d1dadfaf1f83c9a4deae
2009-06-12T15:57:58.721771Z 2009-06-15T17:14:53.377358Z
148433 148499
aph aph
@@ -1180,7 +1180,7 @@ aph
2447 450
cls_19byte.c cls_19byte.c
file file
@@ -1216,82 +1216,14 @@ aph
2966 2966
err_bad_typedef.c cls_9byte1.c
file file
2009-12-20T06:01:57.940803Z 2009-12-20T06:01:57.940803Z
3c916db09b26d1dadfaf1f83c9a4deae 40f4b4ad9bb66b5a7842f381dec87bae
2009-06-15T17:14:53.377358Z
148499
aph
450
cls_align_longdouble_split.c
file
2009-12-20T06:01:57.941803Z
c3b74391bcbacc226027a40d596e59ad
2009-12-08T22:59:02.516289Z
155093
daney
3758
cls_align_float.c
file
2009-12-20T06:01:57.940803Z
a1d5301c2e78da4941bf021422884270
2009-06-12T15:57:58.721771Z 2009-06-12T15:57:58.721771Z
148433 148433
aph aph
@@ -1316,7 +1248,7 @@ aph
2553 2447
closure_fn1.c closure_fn1.c
file file
@@ -1352,14 +1284,14 @@ aph
2873 2873
problem1.c cls_align_float.c
file file
2009-12-20T06:01:57.941803Z 2009-12-20T06:01:57.940803Z
00c9e6412441f7bba3c5d8f863d11d2f a1d5301c2e78da4941bf021422884270
2009-06-12T15:57:58.721771Z 2009-06-12T15:57:58.721771Z
148433 148433
aph aph
@@ -1384,7 +1316,41 @@ aph
2326 2553
cls_align_longdouble_split.c
file
2009-12-20T06:01:57.941803Z
c3b74391bcbacc226027a40d596e59ad
2009-12-08T22:59:02.516289Z
155093
daney
3758
return_fl1.c return_fl1.c
file file
@@ -1420,14 +1386,14 @@ andreast
755 755
closure_fn3.c problem1.c
file file
2009-12-20T06:01:57.941803Z 2009-12-20T06:01:57.941803Z
80762a3d4a50c6d41904442445de79d0 00c9e6412441f7bba3c5d8f863d11d2f
2009-06-12T15:57:58.721771Z 2009-06-12T15:57:58.721771Z
148433 148433
aph aph
@@ -1452,7 +1418,7 @@ aph
2911 2326
return_dbl2.c return_dbl2.c
file file
@@ -1488,14 +1454,14 @@ daney
1005 1005
cls_sshort.c closure_fn3.c
file file
2009-12-20T06:01:57.942803Z 2009-12-20T06:01:57.941803Z
fa0415723a96a5c2da90b627c2ea7651 80762a3d4a50c6d41904442445de79d0
2009-06-12T15:57:58.721771Z 2009-06-12T15:57:58.721771Z
148433 148433
aph aph
@@ -1520,7 +1486,7 @@ aph
1077 2911
return_fl3.c return_fl3.c
file file
@@ -1556,6 +1522,40 @@ daney
967 967
cls_sshort.c
file
2009-12-20T06:01:57.942803Z
fa0415723a96a5c2da90b627c2ea7651
2009-06-12T15:57:58.721771Z
148433
aph
1077
closure_fn5.c closure_fn5.c
file file
@@ -1624,17 +1624,17 @@ aph
2518 2518
cls_2byte.c promotion.c
file file
2009-12-20T06:01:57.943803Z 2009-12-20T06:01:57.942803Z
e9db163228cf54a3739f86c78fc7e39c 09a387482b7ce131ae73efe275816fdd
2009-06-12T15:57:58.721771Z 2006-04-22T21:17:35.201451Z
148433 113181
aph andreast
@@ -1656,7 +1656,7 @@ aph
2432 1353
nested_struct.c nested_struct.c
file file
@@ -1692,48 +1692,14 @@ aph
4695 4695
promotion.c cls_2byte.c
file
2009-12-20T06:01:57.942803Z
09a387482b7ce131ae73efe275816fdd
2006-04-22T21:17:35.201451Z
113181
andreast
1353
float2.c
file file
2009-12-20T06:01:57.943803Z 2009-12-20T06:01:57.943803Z
bccf0bee1af8844103b4fc6d20ac4a00 e9db163228cf54a3739f86c78fc7e39c
2009-06-12T15:57:58.721771Z 2009-06-12T15:57:58.721771Z
148433 148433
aph aph
@@ -1758,7 +1724,41 @@ aph
1479 2432
return_ll1.c
file
2009-12-20T06:01:57.943803Z
4464c6fa615810685c3fa04a8f9be7a3
2009-06-16T10:15:31.432585Z
148521
aph
995
nested_struct10.c nested_struct10.c
file file
@@ -1794,16 +1794,16 @@ aph
3575 3575
return_ll1.c float2.c
file file
2009-12-20T06:01:57.943803Z 2009-12-20T06:01:57.943803Z
4464c6fa615810685c3fa04a8f9be7a3 bccf0bee1af8844103b4fc6d20ac4a00
2009-06-16T10:15:31.432585Z 2009-06-12T15:57:58.721771Z
148521 148433
aph aph
@@ -1826,7 +1826,7 @@ aph
995 1479
cls_4byte.c cls_4byte.c
file file
@@ -2032,40 +2032,6 @@ aph
1685 1685
cls_align_uint32.c
file
2009-12-20T06:01:57.945802Z
3f3c1ce646a897c75eb58a91d34d2ffb
2009-06-12T15:57:58.721771Z
148433
aph
2520
cls_align_sint16.c cls_align_sint16.c
file file
@@ -2100,6 +2066,40 @@ aph
2522 2522
cls_align_uint32.c
file
2009-12-20T06:01:57.945802Z
3f3c1ce646a897c75eb58a91d34d2ffb
2009-06-12T15:57:58.721771Z
148433
aph
2520
cls_double_va.c cls_double_va.c
file file

View File

@@ -52,9 +52,9 @@
#endif #endif
/* MinGW kludge. */ /* MinGW kludge. */
#ifdef WIN64 #ifdef _WIN64
#define PRIdLL "PRId64" #define PRIdLL "I64d"
#define PRIuLL "PRIu64" #define PRIuLL "I64u"
#else #else
#define PRIdLL "lld" #define PRIdLL "lld"
#define PRIuLL "llu" #define PRIuLL "llu"

View File

@@ -1,7 +1,7 @@
10 10
dir dir
155472 155499
svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/libffi.special svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/testsuite/libffi.special
svn+ssh://green@gcc.gnu.org/svn/gcc svn+ssh://green@gcc.gnu.org/svn/gcc

View File

@@ -45,9 +45,9 @@
/* MinGW kludge. */ /* MinGW kludge. */
#ifdef WIN64 #ifdef _WIN64
#define PRIdLL "PRId64" #define PRIdLL "I64d"
#define PRIuLL "PRIu64" #define PRIuLL "I64u"
#else #else
#define PRIdLL "lld" #define PRIdLL "lld"
#define PRIuLL "llu" #define PRIuLL "llu"