--- libffi-3.0.10.orig/configure.ac
+++ libffi-3.0.10/configure.ac
@@ -345,7 +345,7 @@
                  [Cannot use PROT_EXEC on this target, so, we revert to
                    alternative means])
      ;;
-     *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
+     *-apple-darwin10* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*)
        AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1,
                  [Cannot use malloc on this target, so, we revert to
                    alternative means])
--- libffi-3.0.10.orig/libffi.pc.in
+++ libffi-3.0.10/libffi.pc.in
@@ -1,10 +1,10 @@
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
-includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
+includedir=@includedir@
 
 Name: @PACKAGE_NAME@
 Description: Library supporting Foreign Function Interfaces
 Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lffi
-Cflags: -I${includedir}
+Libs: -lffi
+Cflags:
--- libffi-3.0.10.orig/configure
+++ libffi-3.0.10/configure
@@ -14292,7 +14292,7 @@
 $as_echo "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h
 
      ;;
-     *-apple-darwin10* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
+     *-apple-darwin10* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*)
 
 $as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
 
--- libffi-3.0.10.orig/man/ffi_prep_cif_var.3
+++ libffi-3.0.10/man/ffi_prep_cif_var.3
@@ -0,0 +1,73 @@
+.Dd January 25, 2011
+.Dt ffi_prep_cif_var 3
+.Sh NAME
+.Nm ffi_prep_cif_var
+.Nd Prepare a
+.Nm ffi_cif
+structure for use with
+.Nm ffi_call 
+for variadic functions.
+.Sh SYNOPSIS
+.In ffi.h
+.Ft ffi_status
+.Fo ffi_prep_cif_var
+.Fa "ffi_cif *cif"
+.Fa "ffi_abi abi"
+.Fa "unsigned int nfixedargs"
+.Fa "unsigned int ntotalargs"
+.Fa "ffi_type *rtype"
+.Fa "ffi_type **atypes"
+.Fc
+.Sh DESCRIPTION
+The
+.Nm ffi_prep_cif_var
+function prepares a
+.Nm ffi_cif
+structure for use with 
+.Nm ffi_call
+for variadic functions.
+.Fa abi
+specifies a set of calling conventions to use.
+.Fa atypes
+is an array of
+.Fa ntotalargs
+pointers to
+.Nm ffi_type
+structs that describe the data type, size and alignment of each argument.
+.Fa rtype
+points to an
+.Nm ffi_type
+that describes the data type, size and alignment of the
+return value. 
+.Fa nfixedargs
+must contain the number of fixed (non-variadic) arguments.
+Note that to call a non-variadic function
+.Nm ffi_prep_cif
+must be used.
+.Sh RETURN VALUES
+Upon successful completion,
+.Nm ffi_prep_cif_var
+returns
+.Nm FFI_OK .
+It will return
+.Nm FFI_BAD_TYPEDEF
+if
+.Fa cif
+is
+.Nm NULL
+or
+.Fa atypes
+or
+.Fa rtype
+is malformed. If
+.Fa abi
+does not refer to a valid ABI,
+.Nm FFI_BAD_ABI
+will be returned. Available ABIs are
+defined in
+.Nm <ffitarget.h>
+.
+.Sh SEE ALSO
+.Xr ffi 3 ,
+.Xr ffi_call 3 ,
+.Xr ffi_prep_cif 3
--- libffi-3.0.10.orig/man/ffi.3
+++ libffi-3.0.10/man/ffi.3
@@ -16,6 +16,15 @@
 .Fa "ffi_type **atypes"
 .Fc
 .Ft void
+.Fo ffi_prep_cif_var
+.Fa "ffi_cif *cif"
+.Fa "ffi_abi abi"
+.Fa "unsigned int nfixedargs"
+.Fa "unsigned int ntotalargs"
+.Fa "ffi_type *rtype"
+.Fa "ffi_type **atypes"
+.Fc
+.Ft void
 .Fo ffi_call
 .Fa "ffi_cif *cif"
 .Fa "void (*fn)(void)"
@@ -28,4 +37,5 @@
 the called function's interface at compile time.
 .Sh SEE ALSO
 .Xr ffi_prep_cif 3 ,
+.Xr ffi_prep_cif_var 3 ,
 .Xr ffi_call 3
--- libffi-3.0.10.orig/man/ffi_prep_cif.3
+++ libffi-3.0.10/man/ffi_prep_cif.3
@@ -37,7 +37,9 @@
 points to an
 .Nm ffi_type
 that describes the data type, size and alignment of the
-return value.
+return value. Note that to call a variadic function
+.Nm ffi_prep_cif_var
+must be used instead.
 .Sh RETURN VALUES
 Upon successful completion,
 .Nm ffi_prep_cif
@@ -63,4 +65,5 @@
 .
 .Sh SEE ALSO
 .Xr ffi 3 ,
-.Xr ffi_call 3 
+.Xr ffi_call 3 ,
+.Xr ffi_prep_cif_var 3
--- libffi-3.0.10.orig/man/Makefile.am
+++ libffi-3.0.10/man/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS=foreign
 
-EXTRA_DIST = ffi.3 ffi_call.3 ffi_prep_cif.3
+EXTRA_DIST = ffi.3 ffi_call.3 ffi_prep_cif.3 ffi_prep_cif_var.3
 
-man_MANS = ffi.3 ffi_call.3 ffi_prep_cif.3
+man_MANS = ffi.3 ffi_call.3 ffi_prep_cif.3 ffi_prep_cif_var.3
 
--- libffi-3.0.10.orig/debian/libn32ffi5.install
+++ libffi-3.0.10/debian/libn32ffi5.install
@@ -0,0 +1 @@
+usr/lib32/lib*.so.*
--- libffi-3.0.10.orig/debian/libffi5.symbols.armhf
+++ libffi-3.0.10/debian/libffi5.symbols.armhf
@@ -0,0 +1,43 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.9
+ ffi_call@Base 3.0.9
+ ffi_call_SYSV@Base 3.0.9
+ ffi_call_VFP@Base 3.0.10~rc10
+ ffi_closure_SYSV@Base 3.0.9
+ ffi_closure_SYSV_inner@Base 3.0.9
+ ffi_closure_VFP@Base 3.0.10~rc10
+ ffi_closure_alloc@Base 3.0.9
+ ffi_closure_free@Base 3.0.9
+ ffi_java_ptrarray_to_raw@Base 3.0.9
+ ffi_java_raw_call@Base 3.0.9
+ ffi_java_raw_size@Base 3.0.9
+ ffi_java_raw_to_ptrarray@Base 3.0.9
+ ffi_prep_args@Base 3.0.9
+ ffi_prep_cif@Base 3.0.9
+ ffi_prep_cif_machdep@Base 3.0.9
+ ffi_prep_cif_machdep_var@Base 3.0.10~rc10
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.9
+ ffi_prep_closure_loc@Base 3.0.9
+ ffi_prep_java_raw_closure@Base 3.0.9
+ ffi_prep_java_raw_closure_loc@Base 3.0.9
+ ffi_prep_raw_closure@Base 3.0.9
+ ffi_prep_raw_closure_loc@Base 3.0.9
+ ffi_ptrarray_to_raw@Base 3.0.9
+ ffi_raw_call@Base 3.0.9
+ ffi_raw_size@Base 3.0.9
+ ffi_raw_to_ptrarray@Base 3.0.9
+ ffi_stop_here@Base 3.0.9
+ ffi_type_double@Base 3.0.9
+ ffi_type_float@Base 3.0.9
+ ffi_type_pointer@Base 3.0.9
+ ffi_type_sint16@Base 3.0.9
+ ffi_type_sint32@Base 3.0.9
+ ffi_type_sint64@Base 3.0.9
+ ffi_type_sint8@Base 3.0.9
+ ffi_type_test@Base 3.0.9
+ ffi_type_uint16@Base 3.0.9
+ ffi_type_uint32@Base 3.0.9
+ ffi_type_uint64@Base 3.0.9
+ ffi_type_uint8@Base 3.0.9
+ ffi_type_void@Base 3.0.9
--- libffi-3.0.10.orig/debian/lib32ffi5.install
+++ libffi-3.0.10/debian/lib32ffi5.install
@@ -0,0 +1 @@
+usr/lib32/lib*.so.*
--- libffi-3.0.10.orig/debian/libffi5.symbols.mipsel
+++ libffi-3.0.10/debian/libffi5.symbols.mipsel
@@ -0,0 +1,39 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_O32@Base 3.0.4
+ ffi_closure_O32@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_closure_mips_inner_O32@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/libn32ffi-dev.install
+++ libffi-3.0.10/debian/libn32ffi-dev.install
@@ -0,0 +1,3 @@
+usr/lib32/lib*.a
+usr/lib32/lib*.so
+usr/lib32/pkgconfig/*
--- libffi-3.0.10.orig/debian/control
+++ libffi-3.0.10/debian/control
@@ -0,0 +1,124 @@
+Source: libffi
+Priority: optional
+Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
+Uploaders: Matthias Klose <doko@debian.org>
+Build-Depends: debhelper (>= 5), g++-multilib [amd64 i386 mips mipsel powerpc ppc64 s390 sparc kfreebsd-amd64], dejagnu, lsb-release, texinfo,
+  dpkg-dev (>= 1.16.0~ubuntu4)
+Standards-Version: 3.9.2
+Section: libs
+
+Package: libffi-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends: libffi5 (= ${binary:Version}), dpkg (>= 1.15.4) | install-info, ${misc:Depends}
+Conflicts: libffi4-dev
+Description: Foreign Function Interface library (development files)
+ This package contains the headers and static library files necessary for
+ building programs which use libffi.
+ .
+ A foreign function interface is the popular name for the interface that
+ allows code written in one language to call code written in another
+ language.
+
+Package: lib32ffi-dev
+Priority: extra
+Section: libdevel
+Architecture: amd64 ppc64 kfreebsd-amd64
+Depends: libffi-dev (= ${binary:Version}), lib32ffi5 (= ${binary:Version}), ${misc:Depends}
+Conflicts: libc6-i386 (<= 2.9-18)
+Description: Foreign Function Interface library (development files, 32bit)
+ This package contains the headers and static library files necessary for
+ building programs which use libffi.
+ .
+ A foreign function interface is the popular name for the interface that
+ allows code written in one language to call code written in another
+ language.
+
+Package: lib64ffi-dev
+Priority: extra
+Section: libdevel
+Architecture: i386 mips mipsel powerpc sparc s390
+Depends: libffi-dev (= ${binary:Version}), lib64ffi5 (= ${binary:Version}), ${misc:Depends}
+Description: Foreign Function Interface library (development files, 64bit)
+ This package contains the headers and static library files necessary for
+ building programs which use libffi.
+ .
+ A foreign function interface is the popular name for the interface that
+ allows code written in one language to call code written in another
+ language.
+
+Package: libn32ffi-dev
+Priority: extra
+Section: libdevel
+Architecture: mips mipsel
+Depends: libffi-dev (= ${binary:Version}), libn32ffi5 (= ${binary:Version}), ${misc:Depends}
+Description: Foreign Function Interface library (development files, n32)
+ This package contains the headers and static library files necessary for
+ building programs which use libffi.
+ .
+ A foreign function interface is the popular name for the interface that
+ allows code written in one language to call code written in another
+ language.
+
+Package: libffi5
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends: multiarch-support
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Foreign Function Interface library runtime
+ A foreign function interface is the popular name for the interface that
+ allows code written in one language to call code written in another
+ language.
+
+Package: lib32ffi5
+Priority: extra
+Section: libs
+Architecture: amd64 ppc64 kfreebsd-amd64
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Foreign Function Interface library runtime (32bit)
+ A foreign function interface is the popular name for the interface that
+ allows code written in one language to call code written in another
+ language.
+
+Package: lib64ffi5
+Priority: extra
+Section: libs
+Architecture: i386 mips mipsel powerpc sparc s390
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Foreign Function Interface library runtime (64bit)
+ A foreign function interface is the popular name for the interface that
+ allows code written in one language to call code written in another
+ language.
+
+Package: libn32ffi5
+Priority: extra
+Section: libs
+Architecture: mips mipsel
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Foreign Function Interface library runtime (n32)
+ A foreign function interface is the popular name for the interface that
+ allows code written in one language to call code written in another
+ language.
+
+Package: libffi5-dbg
+Priority: extra
+Section: debug
+Architecture: any
+Multi-Arch: same
+Depends: libffi5 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: Foreign Function Interface library runtime (debug symbols)
+ A foreign function interface is the popular name for the interface that
+ allows code written in one language to call code written in another
+ language.
+
+Package: libffi5-udeb
+Section: debian-installer
+XC-Package-Type: udeb
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Foreign Function Interface library runtime
+ A foreign function interface is the popular name for the interface that
+ allows code written in one language to call code written in another
+ language.
--- libffi-3.0.10.orig/debian/libffi-dev.doc-base
+++ libffi-3.0.10/debian/libffi-dev.doc-base
@@ -0,0 +1,18 @@
+Document: libffi
+Title: libffi -- Portable foreign-function interface library
+Abstract: The libffi library provides a portable, high level programming
+ interface to various calling conventions.  This allows a programmer to
+ call any function specified by a call interface description at run
+ time.
+ .
+ FFI stands for Foreign Function Interface.  A foreign function interface
+ is the popular name for the interface that allows code written in one
+ language to call code written in another language.  The libffi library
+ really only provides the lowest, machine dependent layer of a fully featured
+ foreign function interface.  A layer must exist above libffi that handles
+ type conversions for values passed between the two languages.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/libffi5/html/index.html
+Files: /usr/share/doc/libffi5/html/*.html
--- libffi-3.0.10.orig/debian/lib64ffi5.symbols.s390
+++ libffi-3.0.10/debian/lib64ffi5.symbols.s390
@@ -0,0 +1,39 @@
+libffi.so.5 lib64ffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_SYSV@Base 3.0.4
+ ffi_closure_SYSV@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/lib64ffi5.symbols.sparc
+++ libffi-3.0.10/debian/lib64ffi5.symbols.sparc
@@ -0,0 +1,48 @@
+libffi.so.5 lib64ffi5 #MINVER#
+ _ffi_call_v8@Base 3.0.4
+ _ffi_call_v9@Base 3.0.4
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_v8@Base 3.0.4
+ ffi_call_v9@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_closure_sparc_inner_v8@Base 3.0.4
+ ffi_closure_sparc_inner_v9@Base 3.0.4
+ ffi_closure_v8@Base 3.0.4
+ ffi_closure_v9@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_args_v8@Base 3.0.4
+ ffi_prep_args_v9@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
+ ffi_v9_layout_struct@Base 3.0.4
--- libffi-3.0.10.orig/debian/libffi5.symbols.hppa
+++ libffi-3.0.10/debian/libffi5.symbols.hppa
@@ -0,0 +1,39 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_pa32@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_closure_inner_pa32@Base 3.0.4
+ ffi_closure_pa32@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_args_pa32@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/lib64ffi5.symbols
+++ libffi-3.0.10/debian/lib64ffi5.symbols
@@ -0,0 +1 @@
+libffi.so.5 lib64ffi5 #MINVER#
--- libffi-3.0.10.orig/debian/lib64ffi5.symbols.powerpc
+++ libffi-3.0.10/debian/lib64ffi5.symbols.powerpc
@@ -0,0 +1,39 @@
+libffi.so.5 lib64ffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_closure_helper_SYSV@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_args_SYSV@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/libffi5.symbols.sparc
+++ libffi-3.0.10/debian/libffi5.symbols.sparc
@@ -0,0 +1,45 @@
+libffi.so.5 libffi5 #MINVER#
+ _ffi_call_v8@Base 3.0.4
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_v8@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_closure_sparc_inner_v8@Base 3.0.4
+ ffi_closure_sparc_inner_v9@Base 3.0.4
+ ffi_closure_v8@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_args_v8@Base 3.0.4
+ ffi_prep_args_v9@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
+ ffi_v9_layout_struct@Base 3.0.4
--- libffi-3.0.10.orig/debian/libffi5.install
+++ libffi-3.0.10/debian/libffi5.install
@@ -0,0 +1 @@
+usr/lib/*/lib*.so.*
--- libffi-3.0.10.orig/debian/rules
+++ libffi-3.0.10/debian/rules
@@ -0,0 +1,290 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+vafilt = $(subst $(2)=,,$(filter $(2)=%,$(1)))
+DPKG_VARS := $(shell dpkg-architecture)
+DEB_HOST_ARCH		?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH)
+DEB_HOST_GNU_CPU	?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_CPU)
+DEB_HOST_GNU_TYPE	?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE	?= $(call vafilt,$(DPKG_VARS),DEB_BUILD_GNU_TYPE)
+DEB_HOST_MULTIARCH	?= $(call vafilt,$(DPKG_VARS),DEB_HOST_MULTIARCH)
+
+CC  = $(DEB_HOST_GNU_TYPE)-gcc
+CXX = $(DEB_HOST_GNU_TYPE)-g++
+
+distribution := $(shell lsb_release -is)
+distrelease  := $(shell lsb_release -cs)
+# On non official archives, "lsb_release -cs" default to "n/a". Assume
+# sid in that case 
+ifeq ($(distrelease),n/a)
+distrelease     := sid
+endif
+
+ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
+  with_check = yes
+endif
+
+ifneq (,$(filter $(DEB_HOST_ARCH), i386 mips mipsel powerpc s390 sparc))
+  multiarch += biarch64
+  m64 = -m64
+endif
+
+ifneq (,$(filter $(DEB_HOST_ARCH), amd64 kfreebsd-amd64 ppc64))
+  multiarch += biarch32
+  m32 = -m32
+endif
+
+ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
+  multiarch += biarchn32
+  m64  = -mabi=64
+  mn32 = -mabi=n32
+  abin32 = -gnuabin32
+  abi64 = -gnuabi64
+endif
+
+ifeq (,$(filter $(distrelease),lenny etch squeeze sid dapper hardy jaunty karmic lucid))
+  biarch_map := i686=x86_64 powerpc=powerpc64 sparc=sparc64 s390=s390x \
+                x86_64=i686 powerpc64=powerpc mips=mips64 mipsel=mips64el
+else
+  biarch_map := i486=x86_64 powerpc=powerpc64 sparc=sparc64 s390=s390x \
+                x86_64=i486 powerpc64=powerpc mips=mips64 mipsel=mips64el
+endif
+biarch_cpu := $(patsubst $(DEB_HOST_GNU_CPU)=%,%, \
+                         $(filter $(DEB_HOST_GNU_CPU)=%,$(biarch_map)))
+biarch_gnu_type := $(subst $(DEB_HOST_GNU_CPU),$(biarch_cpu),$(DEB_HOST_GNU_TYPE))
+
+major=5
+p=libffi$(major)
+
+configure: stamp-configure $(foreach a, $(multiarch), stamp-configure-$(a))
+stamp-configure:
+	dh_testdir
+	rm -rf build
+	mkdir -p build
+	cd build && ../configure \
+		--host=$(DEB_HOST_GNU_TYPE) \
+		--build=$(DEB_BUILD_GNU_TYPE) \
+		--prefix=/usr \
+		--mandir=\$${prefix}/share/man \
+		--infodir=\$${prefix}/share/info \
+		--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
+		CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CCASFLAGS="$(CFLAGS) -Wa,--gdwarf2" LDFLAGS="-Wl,-z,defs $(LDFLAGS)"
+	touch $@
+
+stamp-configure-biarch32:
+	dh_testdir
+	rm -rf build32
+	mkdir -p build32
+	cd build32 && ../configure \
+		--host=$(biarch_gnu_type) \
+		--build=$(DEB_BUILD_GNU_TYPE) \
+		--prefix=/usr \
+		--mandir=\$${prefix}/share/man \
+		--infodir=\$${prefix}/share/info \
+		--includedir=\$${prefix}/include/$(biarch_gnu_type) \
+		--libdir=\$${prefix}/lib32 \
+		CC="$(CC) $(m32)" CXX="$(CXX) $(m32)" CFLAGS="$(CFLAGS)" CCASFLAGS="$(CFLAGS) -Wa,--gdwarf2" LDFLAGS="-Wl,-z,defs $(LDFLAGS)"
+	touch $@
+
+stamp-configure-biarch64:
+	dh_testdir
+	rm -rf build64
+	mkdir -p build64
+	cd build64 && ../configure \
+		--host=$(biarch_gnu_type) \
+		--build=$(DEB_BUILD_GNU_TYPE) \
+		--prefix=/usr \
+		--mandir=\$${prefix}/share/man \
+		--infodir=\$${prefix}/share/info \
+		--includedir=\$${prefix}/include/$(biarch_gnu_type)$(abi64) \
+		--libdir=\$${prefix}/lib64 \
+		CC="$(CC) $(m64)" CXX="$(CXX) $(m64)" CFLAGS="$(CFLAGS)" CCASFLAGS="$(CFLAGS) -Wa,--gdwarf2" LDFLAGS="-Wl,-z,defs $(LDFLAGS)"
+	touch $@
+
+stamp-configure-biarchn32:
+	dh_testdir
+	rm -rf buildn32
+	mkdir -p buildn32
+	cd buildn32 && ../configure \
+		--host=$(biarch_gnu_type) \
+		--build=$(DEB_BUILD_GNU_TYPE) \
+		--prefix=/usr \
+		--mandir=\$${prefix}/share/man \
+		--infodir=\$${prefix}/share/info \
+		--includedir=\$${prefix}/include/$(biarch_gnu_type)$(abin32) \
+		--libdir=\$${prefix}/lib32 \
+		CC="$(CC) $(mn32)" CXX="$(CXX) $(mn32)" CFLAGS="$(CFLAGS)" CCASFLAGS="$(CFLAGS) -Wa,--gdwarf2" LDFLAGS="-Wl,-z,defs $(LDFLAGS)"
+	touch $@
+
+build: stamp-build \
+    $(foreach arch, $(multiarch), stamp-build-$(arch)) \
+    $(if $(filter yes, $(with_check)), stamp-check $(foreach a, $(multiarch), stamp-check-$(a)))
+stamp-build: stamp-configure
+	dh_testdir
+	$(MAKE) -C build
+	$(MAKE) -C build html
+	touch $@
+
+stamp-build-biarch32: stamp-configure-biarch32
+	dh_testdir
+	$(MAKE) -C build32
+	touch $@
+
+stamp-build-biarch64: stamp-configure-biarch64
+	dh_testdir
+	$(MAKE) -C build64
+	touch $@
+
+stamp-build-biarchn32: stamp-configure-biarchn32
+	dh_testdir
+	$(MAKE) -C buildn32
+	touch $@
+
+check: stamp-check $(foreach a, $(multiarch), stamp-check-$(a))
+stamp-check: stamp-build
+	dh_testdir
+	-$(MAKE) -C build check 2>&1 | tee build/check.log
+	touch $@
+
+stamp-check-biarch32: stamp-build-biarch32
+	dh_testdir
+	mkdir -p build32/bin
+	echo '/usr/bin/gcc $(m32) "$$@"' > build32/bin/gcc
+	chmod 755 build32/bin/gcc
+	-PATH=$(CURDIR)/build32/bin:$$PATH $(MAKE) -C build32 check CC="gcc $(m32)" 2>&1 | tee build32/check.log
+	touch $@
+
+stamp-check-biarch64: stamp-build-biarch64
+	dh_testdir
+	mkdir -p build64/bin
+	echo '/usr/bin/gcc $(m64) "$$@"' > build64/bin/gcc
+	chmod 755 build64/bin/gcc
+ifneq (,$(filter $(DEB_HOST_ARCH), powerpc))
+# work around dejagnu configury; on 64bit powerpc -m64 must be in CFLAGS to pass the testsuite
+	-PATH=$(CURDIR)/build64/bin:$$PATH \
+	  $(MAKE) -C build64 check CC=gcc CXX=g++ CFLAGS="$(m64) $(CFLAGS)" CXXFLAGS="$(m64)" 2>&1 | tee build64/check.log
+else
+	-PATH=$(CURDIR)/build64/bin:$$PATH $(MAKE) -C build64 check CC="gcc $(m64)" 2>&1 | tee build64/check.log
+endif
+	touch $@
+
+stamp-check-biarchn32: stamp-build-biarchn32
+	dh_testdir
+	mkdir -p buildn32/bin
+	echo '/usr/bin/gcc $(mn32) "$$@"' > buildn32/bin/gcc
+	chmod 755 buildn32/bin/gcc
+	-PATH=$(CURDIR)/buildn32/bin:$$PATH $(MAKE) -C buildn32 check CC="gcc $(mn32)" 2>&1 | tee buildn32/check.log
+	touch $@
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f stamp-*
+	rm -rf build*
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs -s
+	$(MAKE) -C build DESTDIR=$(CURDIR)/debian/tmp install
+	cp -p build/.libs/libffi_convenience.a \
+		debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libffi_pic.a
+	mkdir -p debian/libffi-dev/usr/share/doc/$(p)
+	cp -a build/doc/libffi.html debian/libffi-dev/usr/share/doc/$(p)/html
+ifneq (,$(filter biarch32, $(multiarch)))
+	$(MAKE) -C build32 DESTDIR=$(CURDIR)/debian/tmp install
+	cp -p build32/.libs/libffi_convenience.a \
+		debian/tmp/usr/lib32/libffi_pic.a
+endif
+ifneq (,$(filter biarch64, $(multiarch)))
+	$(MAKE) -C build64 DESTDIR=$(CURDIR)/debian/tmp install
+	cp -p build64/.libs/libffi_convenience.a \
+		debian/tmp/usr/lib64/libffi_pic.a
+endif
+ifneq (,$(filter biarchn32, $(multiarch)))
+	$(MAKE) -C buildn32 DESTDIR=$(CURDIR)/debian/tmp install
+	cp -p buildn32/.libs/libffi_convenience.a \
+		debian/tmp/usr/lib32/libffi_pic.a
+endif
+	dh_install -s --sourcedir=debian/tmp
+
+	mkdir -p debian/libffi-dev/usr/include/$(DEB_HOST_MULTIARCH)
+	mv debian/libffi-dev/usr/include/*.h \
+		debian/libffi-dev/usr/include/$(DEB_HOST_MULTIARCH)/
+
+ifneq (,$(filter biarch32, $(multiarch)))
+	mkdir -p debian/lib32ffi-dev/usr/include/$(biarch_gnu_type)
+	mv debian/libffi-dev/usr/include/$(biarch_gnu_type) \
+		debian/lib32ffi-dev/usr/include/
+endif
+ifneq (,$(filter biarch64, $(multiarch)))
+	mkdir -p debian/lib64ffi-dev/usr/include/$(biarch_gnu_type)$(abi64)
+	mv debian/libffi-dev/usr/include/$(biarch_gnu_type)$(abi64) \
+		debian/lib64ffi-dev/usr/include/
+endif
+ifneq (,$(filter biarchn32, $(multiarch)))
+	mkdir -p debian/libn32ffi-dev/usr/include/$(biarch_gnu_type)$(abin32)
+	mv debian/libffi-dev/usr/include/$(biarch_gnu_type)$(abin32) \
+		debian/libn32ffi-dev/usr/include/
+endif
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs -s
+	dh_installdocs -s
+	dh_installinfo -plibffi-dev doc/libffi.info
+	rm -f debian/libffi-dev/usr/share/info/dir*
+	cp -p ChangeLog debian/libffi-dev/usr/share/doc/libffi$(major)/changelog
+	cp -p ChangeLog.* debian/libffi-dev/usr/share/doc/libffi$(major)/
+ifeq ($(with_check),yes)
+	cp -p build/check.log debian/libffi-dev/usr/share/doc/libffi$(major)/test_results_$(DEB_HOST_MULTIARCH).txt
+endif
+	rm -rf debian/libffi-dev/usr/share/doc/libffi-dev
+	ln -s libffi$(major) debian/libffi-dev/usr/share/doc/libffi-dev
+	rm -rf debian/libffi$(major)-dbg/usr/share/doc/libffi$(major)-dbg
+	ln -s libffi$(major) debian/libffi$(major)-dbg/usr/share/doc/libffi$(major)-dbg
+ifneq (,$(filter biarch32, $(multiarch)))
+	rm -rf debian/lib32ffi-dev/usr/share/doc/lib32ffi-dev
+	ln -s libffi-dev debian/lib32ffi-dev/usr/share/doc/lib32ffi-dev
+  ifeq ($(with_check),yes)
+	cat build32/check.log >> debian/libffi-dev/usr/share/doc/libffi$(major)/test_results_bi32_$(DEB_HOST_MULTIARCH).txt
+  endif
+endif
+ifneq (,$(filter biarch64, $(multiarch)))
+	rm -rf debian/lib64ffi-dev/usr/share/doc/lib64ffi-dev
+	ln -s libffi-dev debian/lib64ffi-dev/usr/share/doc/lib64ffi-dev
+  ifeq ($(with_check),yes)
+	cat build64/check.log >> debian/libffi-dev/usr/share/doc/libffi$(major)/test_results_bi64_$(DEB_HOST_MULTIARCH).txt
+  endif
+endif
+ifneq (,$(filter biarchn32, $(multiarch)))
+	rm -rf debian/libn32ffi-dev/usr/share/doc/libn32ffi-dev
+	ln -s libffi-dev debian/libn32ffi-dev/usr/share/doc/libn32ffi-dev
+  ifeq ($(with_check),yes)
+	cat buildn32/check.log >> debian/libffi-dev/usr/share/doc/libffi$(major)/test_results_bi32n_$(DEB_HOST_MULTIARCH).txt
+  endif
+endif
+	dh_strip -s --dbg-package=libffi$(major)-dbg
+	dh_compress -s
+	dh_fixperms -s
+	dh_makeshlibs -plibffi$(major) --add-udeb=libffi$(major)-udeb
+	dh_makeshlibs -s -Nlibffi$(major)
+	dh_installdeb -s
+	dh_shlibdeps -s
+	dh_gencontrol -s
+	dh_md5sums -s
+	dh_builddeb -s
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install 
--- libffi-3.0.10.orig/debian/lib64ffi5.install
+++ libffi-3.0.10/debian/lib64ffi5.install
@@ -0,0 +1 @@
+usr/lib64/lib*.so.*
--- libffi-3.0.10.orig/debian/changelog
+++ libffi-3.0.10/debian/changelog
@@ -0,0 +1,192 @@
+libffi (3.0.10-3) quantal; urgency=low
+
+  * Fix powerpc and ppc64 builds (Kyle Moffett).
+
+ -- Matthias Klose <doko@debian.org>  Wed, 12 Oct 2011 21:14:27 +0200
+
+libffi (3.0.10-2) unstable; urgency=low
+
+  * Fix PowerPC soft-floating-point support (Kyle Moffett).
+    Closes: #644338.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 08 Oct 2011 14:18:42 +0200
+
+libffi (3.0.10-1) unstable; urgency=low
+
+  * Final 3.0.10 release.
+  * Explicitly use the host compiler.
+  * Define FFI_MMAP_EXEC_WRIT on kfreebsd-* (Petr Salinger). Closes: #642928.
+
+ -- Matthias Klose <doko@debian.org>  Tue, 27 Sep 2011 17:01:15 +0200
+
+libffi (3.0.10~rc10-3) unstable; urgency=low
+
+  * Install the test logs with different names depending on the architecture.
+
+ -- Matthias Klose <doko@ubuntu.com>  Thu, 01 Sep 2011 21:36:44 +0200
+
+libffi (3.0.10~rc10-2) unstable; urgency=low
+
+  * Update symbols files.
+
+ -- Matthias Klose <doko@debian.org>  Tue, 23 Aug 2011 12:39:50 +0200
+
+libffi (3.0.10~rc10-1) unstable; urgency=low
+
+  * New upstream release candidate (still using the same soname).
+    - Adds VFP hard-float calling convention support. Closes: #597920.
+  * Add variadic support for armhf (David Gilbert). LP: #739305.
+  * Update debian/copyright file.
+  * Add symbols files for armel and armhf.
+
+ -- Matthias Klose <doko@debian.org>  Mon, 22 Aug 2011 21:21:46 +0200
+
+libffi (3.0.9-7) unstable; urgency=low
+
+  * libffi5-udeb: Fix dependency information (Colin Watson). Closes: #630006.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 11 Jun 2011 21:20:40 +0200
+
+libffi (3.0.9-6) unstable; urgency=low
+
+  * Don't make libffi5-udeb multiarch.
+
+ -- Matthias Klose <doko@debian.org>  Fri, 10 Jun 2011 16:05:50 +0200
+
+libffi (3.0.9-5) unstable; urgency=low
+
+  * Add libffi5-udeb, since libgobject-2.0 requires libffi5 as of GLib
+    2.29.4 (Colin Watson). Closes: #630006.
+  * Build for multiarch.
+
+ -- Matthias Klose <doko@debian.org>  Fri, 10 Jun 2011 12:50:32 +0200
+
+libffi (3.0.9-4) unstable; urgency=low
+
+  * Install to the multiarch triplet directories, not the gnu triplet
+    directories (Steve Langasek). Closes: #622976.
+
+ -- Matthias Klose <doko@debian.org>  Mon, 18 Apr 2011 21:50:12 +0200
+
+libffi (3.0.9-3) unstable; urgency=low
+
+  * Fix PR target/44452, taken from the GCC 4.5 branch.
+
+ -- Matthias Klose <doko@debian.org>  Fri, 01 Oct 2010 14:08:36 +0200
+
+libffi (3.0.9-2ubuntu2) maverick; urgency=low
+
+  * Don't explictely set CC/CXX when configuring. LP: #623222.
+
+ -- Matthias Klose <doko@ubuntu.com>  Fri, 17 Sep 2010 14:08:37 +0200
+
+libffi (3.0.9-2ubuntu1) maverick; urgency=low
+
+  * On arch i386, install headers into /usr/include/i686-linux-gnu.
+
+ -- Matthias Klose <doko@ubuntu.com>  Thu, 20 May 2010 11:03:16 +0200
+
+libffi (3.0.9-2) unstable; urgency=low
+
+  * Fix unsigned long long bug on Sparc v8.
+  * Drop build dependency on expect-tcl8.3 [hppa].
+
+ -- Matthias Klose <doko@debian.org>  Wed, 21 Apr 2010 01:37:11 +0200
+
+libffi (3.0.9-1) unstable; urgency=low
+
+  * New upstream version (final release).
+
+ -- Matthias Klose <doko@debian.org>  Thu, 31 Dec 2009 16:25:53 +0100
+
+libffi (3.0.9~rc9-1) unstable; urgency=low
+
+  * New upstream version (release candidate 9).
+  * Change priority of source and binary packages libffi-dev and libffi5
+    to optional. Closes: #559074.
+  * Fix location of library files in lib32ffi5. Closes: #533009.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 26 Dec 2009 17:05:36 +0100
+
+libffi (3.0.9~rc3-1) unstable; urgency=low
+
+  * New upstream version (release candidate 3).
+  * Work around dejagnu configury, failing all tests on 64bit powerpc.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 01 Nov 2009 13:30:24 +0100
+
+libffi (3.0.9~rc1-1) unstable; urgency=low
+
+  * New upstream version (release candidate 1).
+
+ -- Matthias Klose <doko@debian.org>  Sun, 11 Oct 2009 12:09:36 +0200
+
+libffi (3.0.7-3) unstable; urgency=low
+
+  * Really apply the patch to fix PR libffi/40242, PR libffi/41443.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 04 Oct 2009 21:11:10 +0200
+
+libffi (3.0.7-2) unstable; urgency=low
+
+  * Fix build failure on armel with -mfloat-abi=softfp.
+  * Don't pessimize the code for newer armv6 and armv7 processors.
+  * lib32ffi5: Add a conflict with libc6-i386 (<= 2.9-18). Closes: #533009.
+  * Fix include of example in ffi_call(3). Closes: #512686.
+  * Fix lintian errors and warnings.
+
+ -- Matthias Klose <doko@debian.org>  Wed, 23 Sep 2009 15:24:00 +0200
+
+libffi (3.0.7-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 30 Nov 2008 14:44:36 +0100
+
+libffi (3.0.6-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matthias Klose <doko@debian.org>  Wed, 23 Jul 2008 01:32:07 +0200
+
+libffi (3.0.5-4) unstable; urgency=low
+
+  * Build-depend on expect-tcl8.3 on hppa.
+  * Set CCASFLAGS to generate debugging symbols for assembly code.
+    Closes: #480443.
+
+ -- Matthias Klose <doko@debian.org>  Sun, 25 May 2008 19:31:02 +0200
+
+libffi (3.0.5-3) unstable; urgency=high
+
+  * Fix installation of header files on mips* (Thiemo Seufer).
+    Closes: #481628.
+  * Set CXX in configure targets.
+
+ -- Matthias Klose <doko@debian.org>  Wed, 21 May 2008 16:51:03 +0200
+
+libffi (3.0.5-2) unstable; urgency=low
+
+  * Install header files in multiarch directories. Closes: #480208.
+
+ -- Matthias Klose <doko@debian.org>  Tue, 13 May 2008 04:49:49 +0000
+
+libffi (3.0.5-1) unstable; urgency=low
+
+  * New upstream version.
+  * Suport mips triarch (Arthur Loiret). Closes: #474049.
+
+ -- Matthias Klose <doko@debian.org>  Fri, 04 Apr 2008 21:20:12 +0000
+
+libffi (3.0.4-2) unstable; urgency=medium
+
+  * Fix lib64ffi-dev package description.
+  * Fix FTBFS on kfreebsd-amd64 (Aurelian Jarno). Closes: #471399.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 22 Mar 2008 18:39:07 +0100
+
+libffi (3.0.4-1) unstable; urgency=low
+
+  * The 10th Anniversary Release, split out from the GCC sources.
+
+ -- Matthias Klose <doko@debian.org>  Mon, 10 Mar 2008 06:46:40 +0100
--- libffi-3.0.10.orig/debian/libffi5.symbols.powerpc
+++ libffi-3.0.10/debian/libffi5.symbols.powerpc
@@ -0,0 +1,41 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_SYSV@Base 3.0.4
+ ffi_closure_SYSV@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_closure_helper_SYSV@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_args_SYSV@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/libffi5.symbols.armel
+++ libffi-3.0.10/debian/libffi5.symbols.armel
@@ -0,0 +1,43 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.9
+ ffi_call@Base 3.0.9
+ ffi_call_SYSV@Base 3.0.9
+ ffi_call_VFP@Base 3.0.10~rc10
+ ffi_closure_SYSV@Base 3.0.9
+ ffi_closure_SYSV_inner@Base 3.0.9
+ ffi_closure_VFP@Base 3.0.10~rc10
+ ffi_closure_alloc@Base 3.0.9
+ ffi_closure_free@Base 3.0.9
+ ffi_java_ptrarray_to_raw@Base 3.0.9
+ ffi_java_raw_call@Base 3.0.9
+ ffi_java_raw_size@Base 3.0.9
+ ffi_java_raw_to_ptrarray@Base 3.0.9
+ ffi_prep_args@Base 3.0.9
+ ffi_prep_cif@Base 3.0.9
+ ffi_prep_cif_machdep@Base 3.0.9
+ ffi_prep_cif_machdep_var@Base 3.0.10~rc10
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.9
+ ffi_prep_closure_loc@Base 3.0.9
+ ffi_prep_java_raw_closure@Base 3.0.9
+ ffi_prep_java_raw_closure_loc@Base 3.0.9
+ ffi_prep_raw_closure@Base 3.0.9
+ ffi_prep_raw_closure_loc@Base 3.0.9
+ ffi_ptrarray_to_raw@Base 3.0.9
+ ffi_raw_call@Base 3.0.9
+ ffi_raw_size@Base 3.0.9
+ ffi_raw_to_ptrarray@Base 3.0.9
+ ffi_stop_here@Base 3.0.9
+ ffi_type_double@Base 3.0.9
+ ffi_type_float@Base 3.0.9
+ ffi_type_pointer@Base 3.0.9
+ ffi_type_sint16@Base 3.0.9
+ ffi_type_sint32@Base 3.0.9
+ ffi_type_sint64@Base 3.0.9
+ ffi_type_sint8@Base 3.0.9
+ ffi_type_test@Base 3.0.9
+ ffi_type_uint16@Base 3.0.9
+ ffi_type_uint32@Base 3.0.9
+ ffi_type_uint64@Base 3.0.9
+ ffi_type_uint8@Base 3.0.9
+ ffi_type_void@Base 3.0.9
--- libffi-3.0.10.orig/debian/lib32ffi5.symbols.amd64
+++ libffi-3.0.10/debian/lib32ffi5.symbols.amd64
@@ -0,0 +1,36 @@
+libffi.so.5 lib32ffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_SYSV@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_args@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/lib64ffi-dev.install
+++ libffi-3.0.10/debian/lib64ffi-dev.install
@@ -0,0 +1,3 @@
+usr/lib64/lib*.a
+usr/lib64/lib*.so
+usr/lib64/pkgconfig/*
--- libffi-3.0.10.orig/debian/libffi5.symbols.sparc64
+++ libffi-3.0.10/debian/libffi5.symbols.sparc64
@@ -0,0 +1,48 @@
+libffi.so.5 lib64ffi5 #MINVER#
+ _ffi_call_v8@Base 3.0.4
+ _ffi_call_v9@Base 3.0.4
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_v8@Base 3.0.4
+ ffi_call_v9@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_closure_sparc_inner_v8@Base 3.0.4
+ ffi_closure_sparc_inner_v9@Base 3.0.4
+ ffi_closure_v8@Base 3.0.4
+ ffi_closure_v9@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_args_v8@Base 3.0.4
+ ffi_prep_args_v9@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
+ ffi_v9_layout_struct@Base 3.0.4
--- libffi-3.0.10.orig/debian/libffi5-udeb.install
+++ libffi-3.0.10/debian/libffi5-udeb.install
@@ -0,0 +1 @@
+usr/lib/*/lib*.so.* usr/lib/
--- libffi-3.0.10.orig/debian/libffi5.symbols
+++ libffi-3.0.10/debian/libffi5.symbols
@@ -0,0 +1 @@
+libffi.so.5 libffi5 #MINVER#
--- libffi-3.0.10.orig/debian/libffi5.symbols.mips
+++ libffi-3.0.10/debian/libffi5.symbols.mips
@@ -0,0 +1,39 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_O32@Base 3.0.4
+ ffi_closure_O32@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_closure_mips_inner_O32@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/libffi5.symbols.ia64
+++ libffi-3.0.10/debian/libffi5.symbols.ia64
@@ -0,0 +1,39 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_unix@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_closure_unix@Base 3.0.4
+ ffi_closure_unix_inner@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/libffi5.symbols.s390x
+++ libffi-3.0.10/debian/libffi5.symbols.s390x
@@ -0,0 +1,39 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_SYSV@Base 3.0.4
+ ffi_closure_SYSV@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/libffi5.symbols.amd64
+++ libffi-3.0.10/debian/libffi5.symbols.amd64
@@ -0,0 +1,40 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_unix64@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_closure_unix64@Base 3.0.4
+ ffi_closure_unix64_inner@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/libffi5.symbols.alpha
+++ libffi-3.0.10/debian/libffi5.symbols.alpha
@@ -0,0 +1,37 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/copyright
+++ libffi-3.0.10/debian/copyright
@@ -0,0 +1,79 @@
+This package was debianized by Matthias Klose <doko@debian.org>
+on Mon, 10 Mar 2008 05:46:40 +0000.
+
+It was downloaded from ftp://sourceware.org/pub/libffi/
+
+Upstream Authors: 
+
+    Anthony Green <green@redhat.com>
+    GCC developers
+    See the README and below in the list of copyright holders for a more
+    complete list.
+
+Copyright: 
+    Copyright (c) 1996-2011 Red Hat, Inc.
+    Copyright (C) 1996-2011 Anthony Green
+    Copyright (C) 1996-2010 Free Software Foundation, Inc
+    Copyright (c) 2003, 2004, 2006, 2007, 2008 Kaz Kojima
+    Copyright (c) 2010, 2011, Plausible Labs Cooperative , Inc.
+    Copyright (c) 2010 CodeSourcery
+    Copyright (c) 1998 Andreas Schwab
+    Copyright (c) 2000 Hewlett Packard Company
+    Copyright (c) 2009 Bradley Smith
+    Copyright (c) 2008 David Daney
+    Copyright (c) 2004 Simon Posnjak
+    Copyright (c) 2005 Axis Communications AB
+    Copyright (c) 1998 Cygnus Solutions
+    Copyright (c) 2004 Renesas Technology
+    Copyright (c) 2002, 2007  Bo Thorsen <bo@suse.de>
+    Copyright (c) 2002 Ranjit Mathew
+    Copyright (c) 2002 Roger Sayle
+    Copyright (c) 2000, 2007 Software AG
+    Copyright (c) 2003 Jakub Jelinek
+    Copyright (c) 2000, 2001 John Hornkvist
+    Copyright (c) 1998 Geoffrey Keating
+    Copyright (c) 2008 Björn König
+
+License:
+
+    libffi - Copyright (c) 1996-2010  Red Hat, Inc and others.
+    See source files for details.
+
+    Permission is hereby granted, free of charge, to any person obtaining
+    a copy of this software and associated documentation files (the
+    ``Software''), to deal in the Software without restriction, including
+    without limitation the rights to use, copy, modify, merge, publish,
+    distribute, sublicense, and/or sell copies of the Software, and to
+    permit persons to whom the Software is furnished to do so, subject to
+    the following conditions:
+
+    The above copyright notice and this permission notice shall be included
+    in all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
+    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+    Documentation:
+    Permission is granted to copy, distribute and/or modify this document
+    under the terms of the GNU General Public License as published by the
+    Free Software Foundation; either version 2, or (at your option) any
+    later version.  A copy of the license is included in the
+    section entitled ``GNU General Public License''.
+
+doc/*:
+  Permission is granted to copy, distribute and/or modify this document
+  under the terms of the GNU General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.  A copy of the license is included in the
+  section entitled ``GNU General Public License''.
+
+  On Debian GNU/Linux systems, the complete text of the GNU General
+  Public License is in `/usr/share/common-licenses/GPL'.
+
+The Debian packaging is (C) 2008, 2011 Matthias Klose <doko@debian.org>
+and is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
--- libffi-3.0.10.orig/debian/libffi5.symbols.sh4
+++ libffi-3.0.10/debian/libffi5.symbols.sh4
@@ -0,0 +1,40 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.10~rc10
+ ffi_call@Base 3.0.10~rc10
+ ffi_call_SYSV@Base 3.0.10~rc10
+ ffi_closure_SYSV@Base 3.0.10~rc10
+ ffi_closure_alloc@Base 3.0.10~rc10
+ ffi_closure_free@Base 3.0.10~rc10
+ ffi_closure_helper_SYSV@Base 3.0.10~rc10
+ ffi_java_ptrarray_to_raw@Base 3.0.10~rc10
+ ffi_java_raw_call@Base 3.0.10~rc10
+ ffi_java_raw_size@Base 3.0.10~rc10
+ ffi_java_raw_to_ptrarray@Base 3.0.10~rc10
+ ffi_prep_args@Base 3.0.10~rc10
+ ffi_prep_cif@Base 3.0.10~rc10
+ ffi_prep_cif_machdep@Base 3.0.10~rc10
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.10~rc10
+ ffi_prep_closure_loc@Base 3.0.10~rc10
+ ffi_prep_java_raw_closure@Base 3.0.10~rc10
+ ffi_prep_java_raw_closure_loc@Base 3.0.10~rc10
+ ffi_prep_raw_closure@Base 3.0.10~rc10
+ ffi_prep_raw_closure_loc@Base 3.0.10~rc10
+ ffi_ptrarray_to_raw@Base 3.0.10~rc10
+ ffi_raw_call@Base 3.0.10~rc10
+ ffi_raw_size@Base 3.0.10~rc10
+ ffi_raw_to_ptrarray@Base 3.0.10~rc10
+ ffi_stop_here@Base 3.0.10~rc10
+ ffi_type_double@Base 3.0.10~rc10
+ ffi_type_float@Base 3.0.10~rc10
+ ffi_type_pointer@Base 3.0.10~rc10
+ ffi_type_sint16@Base 3.0.10~rc10
+ ffi_type_sint32@Base 3.0.10~rc10
+ ffi_type_sint64@Base 3.0.10~rc10
+ ffi_type_sint8@Base 3.0.10~rc10
+ ffi_type_test@Base 3.0.10~rc10
+ ffi_type_uint16@Base 3.0.10~rc10
+ ffi_type_uint32@Base 3.0.10~rc10
+ ffi_type_uint64@Base 3.0.10~rc10
+ ffi_type_uint8@Base 3.0.10~rc10
+ ffi_type_void@Base 3.0.10~rc10
--- libffi-3.0.10.orig/debian/libffi5.symbols.arm
+++ libffi-3.0.10/debian/libffi5.symbols.arm
@@ -0,0 +1,39 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_SYSV@Base 3.0.4
+ ffi_closure_SYSV@Base 3.0.4
+ ffi_closure_SYSV_inner@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_args@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/compat
+++ libffi-3.0.10/debian/compat
@@ -0,0 +1 @@
+5
--- libffi-3.0.10.orig/debian/lib64ffi5.symbols.i386
+++ libffi-3.0.10/debian/lib64ffi5.symbols.i386
@@ -0,0 +1,40 @@
+libffi.so.5 lib64ffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_unix64@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_closure_unix64@Base 3.0.4
+ ffi_closure_unix64_inner@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/watch
+++ libffi-3.0.10/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=uversionmangle=s/(rc[0-9]+)$/~$1/ \
+  ftp://sourceware.org/pub/libffi/libffi-(.*).tar.gz
--- libffi-3.0.10.orig/debian/libffi5.symbols.powerpcspe
+++ libffi-3.0.10/debian/libffi5.symbols.powerpcspe
@@ -0,0 +1,41 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_SYSV@Base 3.0.4
+ ffi_closure_SYSV@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_closure_helper_SYSV@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_args_SYSV@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/lib32ffi-dev.install
+++ libffi-3.0.10/debian/lib32ffi-dev.install
@@ -0,0 +1,3 @@
+usr/lib32/lib*.a
+usr/lib32/lib*.so
+usr/lib32/pkgconfig/*
--- libffi-3.0.10.orig/debian/libffi-dev.install
+++ libffi-3.0.10/debian/libffi-dev.install
@@ -0,0 +1,5 @@
+usr/include/*
+usr/lib/*/lib*.a
+usr/lib/*/lib*.so
+usr/lib/*/pkgconfig/*
+usr/share/*
--- libffi-3.0.10.orig/debian/lib32ffi5.symbols
+++ libffi-3.0.10/debian/lib32ffi5.symbols
@@ -0,0 +1 @@
+libffi.so.5 lib32ffi5 #MINVER#
--- libffi-3.0.10.orig/debian/libffi5.symbols.m68k
+++ libffi-3.0.10/debian/libffi5.symbols.m68k
@@ -0,0 +1,41 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_SYSV@Base 3.0.4
+ ffi_closure_SYSV@Base 3.0.4
+ ffi_closure_SYSV_inner@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_closure_struct_SYSV@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_args@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/libffi5.symbols.hurd-i386
+++ libffi-3.0.10/debian/libffi5.symbols.hurd-i386
@@ -0,0 +1,35 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_SYSV@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_args@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/libffi5.symbols.i386
+++ libffi-3.0.10/debian/libffi5.symbols.i386
@@ -0,0 +1,36 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_SYSV@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_args@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/debian/libffi5.symbols.s390
+++ libffi-3.0.10/debian/libffi5.symbols.s390
@@ -0,0 +1,39 @@
+libffi.so.5 libffi5 #MINVER#
+ ffi_assert@Base 3.0.4
+ ffi_call@Base 3.0.4
+ ffi_call_SYSV@Base 3.0.4
+ ffi_closure_SYSV@Base 3.0.4
+ ffi_closure_alloc@Base 3.0.4
+ ffi_closure_free@Base 3.0.4
+ ffi_java_ptrarray_to_raw@Base 3.0.4
+ ffi_java_raw_call@Base 3.0.4
+ ffi_java_raw_size@Base 3.0.4
+ ffi_java_raw_to_ptrarray@Base 3.0.4
+ ffi_prep_cif@Base 3.0.4
+ ffi_prep_cif_machdep@Base 3.0.4
+ ffi_prep_cif_var@Base 3.0.10~rc10
+ ffi_prep_closure@Base 3.0.4
+ ffi_prep_closure_loc@Base 3.0.4
+ ffi_prep_java_raw_closure@Base 3.0.4
+ ffi_prep_java_raw_closure_loc@Base 3.0.4
+ ffi_prep_raw_closure@Base 3.0.4
+ ffi_prep_raw_closure_loc@Base 3.0.4
+ ffi_ptrarray_to_raw@Base 3.0.4
+ ffi_raw_call@Base 3.0.4
+ ffi_raw_size@Base 3.0.4
+ ffi_raw_to_ptrarray@Base 3.0.4
+ ffi_stop_here@Base 3.0.4
+ ffi_type_double@Base 3.0.4
+ ffi_type_float@Base 3.0.4
+ ffi_type_longdouble@Base 3.0.4
+ ffi_type_pointer@Base 3.0.4
+ ffi_type_sint16@Base 3.0.4
+ ffi_type_sint32@Base 3.0.4
+ ffi_type_sint64@Base 3.0.4
+ ffi_type_sint8@Base 3.0.4
+ ffi_type_test@Base 3.0.4
+ ffi_type_uint16@Base 3.0.4
+ ffi_type_uint32@Base 3.0.4
+ ffi_type_uint64@Base 3.0.4
+ ffi_type_uint8@Base 3.0.4
+ ffi_type_void@Base 3.0.4
--- libffi-3.0.10.orig/doc/libffi.info
+++ libffi-3.0.10/doc/libffi.info
@@ -1,5 +1,5 @@
-This is ../libffi/doc/libffi.info, produced by makeinfo version 4.13
-from ../libffi/doc/libffi.texi.
+This is ../doc/libffi.info, produced by makeinfo version 4.13 from
+../doc/libffi.texi.
 
 This manual is for Libffi, a portable foreign-function interface
 library.
@@ -115,8 +115,6 @@
      want.  *note Multiple ABIs:: for more information.
 
      NARGS is the number of arguments that this function accepts.
-     `libffi' does not yet handle varargs functions; see *note Missing
-     Features:: for more information.
 
      RTYPE is a pointer to an `ffi_type' structure that describes the
      return type of the function.  *Note Types::.
@@ -129,6 +127,30 @@
      properly; `FFI_BAD_TYPEDEF' if one of the `ffi_type' objects is
      incorrect; or `FFI_BAD_ABI' if the ABI parameter is invalid.
 
+   If the function being called is variadic (varargs) then
+`ffi_prep_cif_var' must be used instead of `ffi_prep_cif'.
+
+ -- Function: ffi_status ffi_prep_cif_var (ffi_cif *CIF, ffi_abi ABI,
+          unsigned int NFIXEDARGS, unsigned int NTOTALARGS, ffi_type
+          *RTYPE, ffi_type **ARGTYPES)
+     This initializes CIF according to the given parameters for a call
+     to a variadic function.  In general it's operation is the same as
+     for `ffi_prep_cif' except that:
+
+     NFIXEDARGS is the number of fixed arguments, prior to any variadic
+     arguments.  It must be greater than zero.
+
+     NTOTALARGS the total number of arguments, including variadic and
+     fixed arguments.
+
+     Note that, different cif's must be prepped for calls to the same
+     function when different numbers of arguments are passed.
+
+     Also note that a call to `ffi_prep_cif_var' with
+     NFIXEDARGS=NOTOTALARGS is NOT equivalent to a call to
+     `ffi_prep_cif'.
+
+
    To call a function using an initialized `ffi_cif', use the
 `ffi_call' function:
 
@@ -511,9 +533,7 @@
 `libffi' is missing a few features.  We welcome patches to add support
 for these.
 
-   * There is no support for calling varargs functions.  This may work
-     on some platforms, depending on how the ABI is defined, but it is
-     not reliable.
+   * Variadic closures.
 
    * There is no support for bit fields in structures.
 
@@ -521,6 +541,9 @@
 
    * The "raw" API is undocumented.
 
+   Note that variadic support is very new and tested on a relatively
+small number of platforms.
+
 
 File: libffi.info,  Node: Index,  Prev: Missing Features,  Up: Top
 
@@ -538,11 +561,12 @@
 * closure API:                           The Closure API.      (line 13)
 * closures:                              The Closure API.      (line 13)
 * FFI:                                   Introduction.         (line 31)
-* ffi_call:                              The Basics.           (line 41)
+* ffi_call:                              The Basics.           (line 63)
 * ffi_closure_alloc:                     The Closure API.      (line 19)
 * ffi_closure_free:                      The Closure API.      (line 26)
 * FFI_CLOSURES:                          The Closure API.      (line 13)
 * ffi_prep_cif:                          The Basics.           (line 16)
+* ffi_prep_cif_var:                      The Basics.           (line 39)
 * ffi_prep_closure_loc:                  The Closure API.      (line 34)
 * ffi_status <1>:                        The Closure API.      (line 37)
 * ffi_status:                            The Basics.           (line 18)
@@ -570,24 +594,24 @@
 * ffi_type_void:                         Primitive Types.      (line 10)
 * Foreign Function Interface:            Introduction.         (line 31)
 * void <1>:                              The Closure API.      (line 20)
-* void:                                  The Basics.           (line 43)
+* void:                                  The Basics.           (line 65)
 
 
 
 Tag Table:
-Node: Top706
-Node: Introduction1448
-Node: Using libffi3084
-Node: The Basics3570
-Node: Simple Example6356
-Node: Types7383
-Node: Primitive Types7666
-Node: Structures9486
-Node: Type Example10346
-Node: Multiple ABIs11569
-Node: The Closure API11940
-Node: Closure Example14884
-Node: Missing Features16443
-Node: Index16936
+Node: Top692
+Node: Introduction1434
+Node: Using libffi3070
+Node: The Basics3556
+Node: Simple Example7192
+Node: Types8219
+Node: Primitive Types8502
+Node: Structures10322
+Node: Type Example11182
+Node: Multiple ABIs12405
+Node: The Closure API12776
+Node: Closure Example15720
+Node: Missing Features17279
+Node: Index17732
 
 End Tag Table
--- libffi-3.0.10.orig/doc/libffi.texi
+++ libffi-3.0.10/doc/libffi.texi
@@ -133,8 +133,6 @@
 you want.  @ref{Multiple ABIs} for more information.
 
 @var{nargs} is the number of arguments that this function accepts.
-@samp{libffi} does not yet handle varargs functions; see @ref{Missing
-Features} for more information.
 
 @var{rtype} is a pointer to an @code{ffi_type} structure that
 describes the return type of the function.  @xref{Types}.
@@ -150,6 +148,28 @@
 is invalid.
 @end defun
 
+If the function being called is variadic (varargs) then @code{ffi_prep_cif_var}
+must be used instead of @code{ffi_prep_cif}.
+
+@findex ffi_prep_cif_var
+@defun ffi_status ffi_prep_cif_var (ffi_cif *@var{cif}, ffi_abi @var{abi}, unsigned int @var{nfixedargs}, unsigned int @var{ntotalargs}, ffi_type *@var{rtype}, ffi_type **@var{argtypes})
+This initializes @var{cif} according to the given parameters for
+a call to a variadic function.  In general it's operation is the
+same as for @code{ffi_prep_cif} except that:
+
+@var{nfixedargs} is the number of fixed arguments, prior to any
+variadic arguments.  It must be greater than zero.
+
+@var{ntotalargs} the total number of arguments, including variadic
+and fixed arguments.
+
+Note that, different cif's must be prepped for calls to the same
+function when different numbers of arguments are passed.
+
+Also note that a call to @code{ffi_prep_cif_var} with @var{nfixedargs}=@var{nototalargs}
+is NOT equivalent to a call to @code{ffi_prep_cif}.
+
+@end defun
 
 To call a function using an initialized @code{ffi_cif}, use the
 @code{ffi_call} function:
@@ -572,9 +592,7 @@
 
 @itemize @bullet
 @item
-There is no support for calling varargs functions.  This may work on
-some platforms, depending on how the ABI is defined, but it is not
-reliable.
+Variadic closures.
 
 @item
 There is no support for bit fields in structures.
@@ -591,6 +609,7 @@
 @c anything else?
 @end itemize
 
+Note that variadic support is very new and tested on a relatively small number of platforms.
 
 @node Index
 @unnumbered Index
--- libffi-3.0.10.orig/src/prep_cif.c
+++ libffi-3.0.10/src/prep_cif.c
@@ -90,20 +90,33 @@
 /* Perform machine independent ffi_cif preparation, then call
    machine dependent routine. */
 
-ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs,
-			ffi_type *rtype, ffi_type **atypes)
+/* For non variadic functions isvariadic should be 0 and
+   nfixedargs==ntotalargs.
+
+   For variadic calls, isvariadic should be 1 and nfixedargs
+   and ntotalargs set as appropriate. nfixedargs must always be >=1 */
+
+
+ffi_status FFI_HIDDEN ffi_prep_cif_core(ffi_cif *cif, ffi_abi abi,
+			     unsigned int isvariadic,
+                             unsigned int nfixedargs,
+                             unsigned int ntotalargs,
+			     ffi_type *rtype, ffi_type **atypes)
 {
   unsigned bytes = 0;
   unsigned int i;
   ffi_type **ptr;
 
   FFI_ASSERT(cif != NULL);
+  FFI_ASSERT((!isvariadic) || (nfixedargs >= 1));
+  FFI_ASSERT(nfixedargs <= ntotalargs);
+
   if (! (abi > FFI_FIRST_ABI && abi < FFI_LAST_ABI))
     return FFI_BAD_ABI;
 
   cif->abi = abi;
   cif->arg_types = atypes;
-  cif->nargs = nargs;
+  cif->nargs = ntotalargs;
   cif->rtype = rtype;
 
   cif->flags = 0;
@@ -159,10 +172,31 @@
   cif->bytes = bytes;
 
   /* Perform machine dependent cif processing */
+#ifdef FFI_TARGET_SPECIFIC_VARIADIC
+  if (isvariadic)
+	return ffi_prep_cif_machdep_var(cif, nfixedargs, ntotalargs);
+#endif
+
   return ffi_prep_cif_machdep(cif);
 }
 #endif /* not __CRIS__ */
 
+ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs,
+			     ffi_type *rtype, ffi_type **atypes)
+{
+  return ffi_prep_cif_core(cif, abi, 0, nargs, nargs, rtype, atypes);
+}
+
+ffi_status ffi_prep_cif_var(ffi_cif *cif,
+                            ffi_abi abi,
+                            unsigned int nfixedargs,
+                            unsigned int ntotalargs,
+                            ffi_type *rtype,
+                            ffi_type **atypes)
+{
+  return ffi_prep_cif_core(cif, abi, 1, nfixedargs, ntotalargs, rtype, atypes);
+}
+
 #if FFI_CLOSURES
 
 ffi_status
--- libffi-3.0.10.orig/src/arm/ffi.c
+++ libffi-3.0.10/src/arm/ffi.c
@@ -189,6 +189,18 @@
   return FFI_OK;
 }
 
+/* Perform machine dependent cif processing for variadic calls */
+ffi_status ffi_prep_cif_machdep_var(ffi_cif *cif, 
+				    unsigned int nfixedargs,
+				    unsigned int ntotalargs)
+{
+  /* VFP variadic calls actually use the SYSV ABI */
+  if (cif->abi == FFI_VFP)
+	cif->abi = FFI_SYSV;
+
+  return ffi_prep_cif_machdep(cif);
+}
+
 /* Prototypes for assembly functions, in sysv.S */
 extern void ffi_call_SYSV (void (*fn)(void), extended_cif *, unsigned, unsigned, unsigned *);
 extern void ffi_call_VFP (void (*fn)(void), extended_cif *, unsigned, unsigned, unsigned *);
--- libffi-3.0.10.orig/src/arm/ffitarget.h
+++ libffi-3.0.10/src/arm/ffitarget.h
@@ -55,6 +55,8 @@
 #define FFI_TYPE_STRUCT_VFP_FLOAT  (FFI_TYPE_LAST + 1)
 #define FFI_TYPE_STRUCT_VFP_DOUBLE (FFI_TYPE_LAST + 2)
 
+#define FFI_TARGET_SPECIFIC_VARIADIC
+
 /* ---- Definitions for closures ----------------------------------------- */
 
 #define FFI_CLOSURES 1
@@ -62,4 +64,3 @@
 #define FFI_NATIVE_RAW_API 0
 
 #endif
-
--- libffi-3.0.10.orig/src/powerpc/sysv.S
+++ libffi-3.0.10/src/powerpc/sysv.S
@@ -83,6 +83,7 @@
 	nop
 1:
 
+#ifndef __NO_FPRS__
 	/* Load all the FP registers.  */
 	bf-	6,2f
 	lfd	%f1,-16-(8*4)-(8*8)(%r28)
@@ -94,6 +95,7 @@
 	lfd	%f6,-16-(8*4)-(3*8)(%r28)
 	lfd	%f7,-16-(8*4)-(2*8)(%r28)
 	lfd	%f8,-16-(8*4)-(1*8)(%r28)
+#endif
 2:
 
 	/* Make the call.  */
@@ -103,7 +105,9 @@
 	mtcrf	0x01,%r31 /* cr7  */
 	bt-	31,L(small_struct_return_value)
 	bt-	30,L(done_return_value)
+#ifndef __NO_FPRS__
 	bt-	29,L(fp_return_value)
+#endif
 	stw	%r3,0(%r30)
 	bf+	28,L(done_return_value)
 	stw	%r4,4(%r30)
@@ -124,6 +128,7 @@
 	lwz	%r1,0(%r1)
 	blr
 
+#ifndef __NO_FPRS__
 L(fp_return_value):
 	bf	28,L(float_return_value)
 	stfd	%f1,0(%r30)
@@ -134,6 +139,7 @@
 L(float_return_value):
 	stfs	%f1,0(%r30)
 	b	L(done_return_value)
+#endif
 
 L(small_struct_return_value):
 	extrwi	%r6,%r31,2,19         /* number of bytes padding = shift/8 */
--- libffi-3.0.10.orig/src/powerpc/ffi.c
+++ libffi-3.0.10/src/powerpc/ffi.c
@@ -40,7 +40,9 @@
   /* The assembly depends on these exact flags.  */
   FLAG_RETURNS_SMST	= 1 << (31-31), /* Used for FFI_SYSV small structs.  */
   FLAG_RETURNS_NOTHING  = 1 << (31-30), /* These go in cr7 */
+#ifndef __NO_FPRS__
   FLAG_RETURNS_FP       = 1 << (31-29),
+#endif
   FLAG_RETURNS_64BITS   = 1 << (31-28),
 
   FLAG_RETURNS_128BITS  = 1 << (31-27), /* cr6  */
@@ -51,21 +53,20 @@
   /* Bits (31-24) through (31-19) store shift value for SMST */
 
   FLAG_ARG_NEEDS_COPY   = 1 << (31- 7),
+#ifndef __NO_FPRS__
   FLAG_FP_ARGUMENTS     = 1 << (31- 6), /* cr1.eq; specified by ABI */
+#endif
   FLAG_4_GPR_ARGUMENTS  = 1 << (31- 5),
   FLAG_RETVAL_REFERENCE = 1 << (31- 4)
 };
 
 /* About the SYSV ABI.  */
-unsigned int NUM_GPR_ARG_REGISTERS = 8;
+#define ASM_NEEDS_REGISTERS 4
+#define NUM_GPR_ARG_REGISTERS 8
 #ifndef __NO_FPRS__
-unsigned int NUM_FPR_ARG_REGISTERS = 8;
-#else
-unsigned int NUM_FPR_ARG_REGISTERS = 0;
+# define NUM_FPR_ARG_REGISTERS 8
 #endif
 
-enum { ASM_NEEDS_REGISTERS = 4 };
-
 /* ffi_prep_args_SYSV is called by the assembly routine once stack space
    has been allocated for the function's arguments.
 
@@ -114,10 +115,12 @@
   valp gpr_base;
   int intarg_count;
 
+#ifndef __NO_FPRS__
   /* 'fpr_base' points at the space for fpr1, and grows upwards as
      we use FPR registers.  */
   valp fpr_base;
   int fparg_count;
+#endif
 
   /* 'copy_space' grows down as we put structures in it.  It should
      stay 16-byte aligned.  */
@@ -126,9 +129,8 @@
   /* 'next_arg' grows up as we put parameters in it.  */
   valp next_arg;
 
-  int i, ii MAYBE_UNUSED;
+  int i;
   ffi_type **ptr;
-  double double_tmp;
   union {
     void **v;
     char **c;
@@ -144,15 +146,16 @@
   size_t struct_copy_size;
   unsigned gprvalue;
 
-  if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT)
-    NUM_FPR_ARG_REGISTERS = 0;
-
   stacktop.c = (char *) stack + bytes;
   gpr_base.u = stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS;
   intarg_count = 0;
+#ifndef __NO_FPRS__
   fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS;
   fparg_count = 0;
   copy_space.c = ((flags & FLAG_FP_ARGUMENTS) ? fpr_base.c : gpr_base.c);
+#else
+  copy_space.c = gpr_base.c;
+#endif
   next_arg.u = stack + 2;
 
   /* Check that everything starts aligned properly.  */
@@ -175,12 +178,29 @@
        i > 0;
        i--, ptr++, p_argv.v++)
     {
-      switch ((*ptr)->type)
-	{
+      unsigned short typenum = (*ptr)->type;
+
+      /* We may need to handle some values depending on ABI */
+      if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) {
+		if (typenum == FFI_TYPE_FLOAT)
+			typenum = FFI_TYPE_UINT32;
+		if (typenum == FFI_TYPE_DOUBLE)
+			typenum = FFI_TYPE_UINT64;
+		if (typenum == FFI_TYPE_LONGDOUBLE)
+			typenum = FFI_TYPE_UINT128;
+      } else if (ecif->cif->abi != FFI_LINUX) {
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
+		if (typenum == FFI_TYPE_LONGDOUBLE)
+			typenum = FFI_TYPE_STRUCT;
+#endif
+      }
+
+      /* Now test the translated value */
+      switch (typenum) {
+        double double_tmp;
+#ifndef __NO_FPRS__
 	case FFI_TYPE_FLOAT:
 	  /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32.  */
-	  if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT)
-	    goto soft_float_prep;
 	  double_tmp = **p_argv.f;
 	  if (fparg_count >= NUM_FPR_ARG_REGISTERS)
 	    {
@@ -196,8 +216,6 @@
 
 	case FFI_TYPE_DOUBLE:
 	  /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64.  */
-	  if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT)
-	    goto soft_double_prep;
 	  double_tmp = **p_argv.d;
 
 	  if (fparg_count >= NUM_FPR_ARG_REGISTERS)
@@ -219,43 +237,6 @@
 
 #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
 	case FFI_TYPE_LONGDOUBLE:
-	  if ((ecif->cif->abi != FFI_LINUX)
-		&& (ecif->cif->abi != FFI_LINUX_SOFT_FLOAT))
-	    goto do_struct;
-	  /* The soft float ABI for long doubles works like this,
-	     a long double is passed in four consecutive gprs if available.
-	     A maximum of 2 long doubles can be passed in gprs.
-	     If we do not have 4 gprs left, the long double is passed on the
-	     stack, 4-byte aligned.  */
-	  if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT)
-	    {
-	      unsigned int int_tmp = (*p_argv.ui)[0];
-	      if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3)
-		{
-		  if (intarg_count < NUM_GPR_ARG_REGISTERS)
-		    intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count;
-		  *next_arg.u = int_tmp;
-		  next_arg.u++;
-		  for (ii = 1; ii < 4; ii++)
-		    {
-		      int_tmp = (*p_argv.ui)[ii];
-		      *next_arg.u = int_tmp;
-		      next_arg.u++;
-		    }
-		}
-	      else
-		{
-		  *gpr_base.u++ = int_tmp;
-		  for (ii = 1; ii < 4; ii++)
-		    {
-		      int_tmp = (*p_argv.ui)[ii];
-		      *gpr_base.u++ = int_tmp;
-		    }
-		}
-	      intarg_count +=4;
-	    }
-	  else
-	    {
 	      double_tmp = (*p_argv.d)[0];
 
 	      if (fparg_count >= NUM_FPR_ARG_REGISTERS - 1)
@@ -281,13 +262,40 @@
 
 	      fparg_count += 2;
 	      FFI_ASSERT (flags & FLAG_FP_ARGUMENTS);
-	    }
 	  break;
 #endif
+#endif /* have FPRs */
+	
+	/* 
+	 * The soft float ABI for long doubles works like this, a long double
+	 * is passed in four consecutive GPRs if available.  A maximum of 2
+	 * long doubles can be passed in gprs.  If we do not have 4 GPRs
+	 * left, the long double is passed on the stack, 4-byte aligned.
+	 */
+	case FFI_TYPE_UINT128: {
+		unsigned int int_tmp = (*p_argv.ui)[0];
+		unsigned int ii;
+		if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3) {
+			if (intarg_count < NUM_GPR_ARG_REGISTERS)
+				intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count;
+			*(next_arg.u++) = int_tmp;
+			for (ii = 1; ii < 4; ii++) {
+				int_tmp = (*p_argv.ui)[ii];
+				*(next_arg.u++) = int_tmp;
+			}
+		} else {
+			*(gpr_base.u++) = int_tmp;
+			for (ii = 1; ii < 4; ii++) {
+				int_tmp = (*p_argv.ui)[ii];
+				*(gpr_base.u++) = int_tmp;
+			}
+		}
+		intarg_count += 4;
+		break;
+	}
 
 	case FFI_TYPE_UINT64:
 	case FFI_TYPE_SINT64:
-	soft_double_prep:
 	  if (intarg_count == NUM_GPR_ARG_REGISTERS-1)
 	    intarg_count++;
 	  if (intarg_count >= NUM_GPR_ARG_REGISTERS)
@@ -320,9 +328,6 @@
 	  break;
 
 	case FFI_TYPE_STRUCT:
-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
-	do_struct:
-#endif
 	  struct_copy_size = ((*ptr)->size + 15) & ~0xF;
 	  copy_space.c -= struct_copy_size;
 	  memcpy (copy_space.c, *p_argv.c, (*ptr)->size);
@@ -350,7 +355,6 @@
 	case FFI_TYPE_UINT32:
 	case FFI_TYPE_SINT32:
 	case FFI_TYPE_POINTER:
-	soft_float_prep:
 
 	  gprvalue = **p_argv.ui;
 
@@ -367,8 +371,10 @@
   /* Check that we didn't overrun the stack...  */
   FFI_ASSERT (copy_space.c >= next_arg.c);
   FFI_ASSERT (gpr_base.u <= stacktop.u - ASM_NEEDS_REGISTERS);
+#ifndef __NO_FPRS__
   FFI_ASSERT (fpr_base.u
 	      <= stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS);
+#endif
   FFI_ASSERT (flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4);
 }
 
@@ -605,9 +611,6 @@
   unsigned type = cif->rtype->type;
   unsigned size = cif->rtype->size;
 
-  if (cif->abi == FFI_LINUX_SOFT_FLOAT)
-    NUM_FPR_ARG_REGISTERS = 0;
-
   if (cif->abi != FFI_LINUX64)
     {
       /* All the machine-independent calculation of cif->bytes will be wrong.
@@ -647,25 +650,38 @@
      - Single/double FP values in fpr1, long double in fpr1,fpr2.
      - soft-float float/doubles are treated as UINT32/UINT64 respectivley.
      - soft-float long doubles are returned in gpr3-gpr6.  */
+  /* First translate for softfloat/nonlinux */
+  if (cif->abi == FFI_LINUX_SOFT_FLOAT) {
+	if (type == FFI_TYPE_FLOAT)
+		type = FFI_TYPE_UINT32;
+	if (type == FFI_TYPE_DOUBLE)
+		type = FFI_TYPE_UINT64;
+	if (type == FFI_TYPE_LONGDOUBLE)
+		type = FFI_TYPE_UINT128;
+  } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) {
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
+	if (type == FFI_TYPE_LONGDOUBLE)
+		type = FFI_TYPE_STRUCT;
+#endif
+  }
+
   switch (type)
     {
-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
+#ifndef __NO_FPRS__
     case FFI_TYPE_LONGDOUBLE:
-      if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64
-	&& cif->abi != FFI_LINUX_SOFT_FLOAT)
-	goto byref;
       flags |= FLAG_RETURNS_128BITS;
       /* Fall through.  */
-#endif
     case FFI_TYPE_DOUBLE:
       flags |= FLAG_RETURNS_64BITS;
       /* Fall through.  */
     case FFI_TYPE_FLOAT:
-      /* With FFI_LINUX_SOFT_FLOAT no fp registers are used.  */
-      if (cif->abi != FFI_LINUX_SOFT_FLOAT)
-	flags |= FLAG_RETURNS_FP;
+      flags |= FLAG_RETURNS_FP;
       break;
+#endif
 
+    case FFI_TYPE_UINT128:
+      flags |= FLAG_RETURNS_128BITS;
+      /* Fall through.  */
     case FFI_TYPE_UINT64:
     case FFI_TYPE_SINT64:
       flags |= FLAG_RETURNS_64BITS;
@@ -700,9 +716,6 @@
 		}
 	    }
 	}
-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
-    byref:
-#endif
       intarg_count++;
       flags |= FLAG_RETVAL_REFERENCE;
       /* Fall through.  */
@@ -723,39 +736,36 @@
        Stuff on the stack needs to keep proper alignment.  */
     for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++)
       {
-	switch ((*ptr)->type)
-	  {
+	unsigned short typenum = (*ptr)->type;
+
+	/* We may need to handle some values depending on ABI */
+	if (cif->abi == FFI_LINUX_SOFT_FLOAT) {
+		if (typenum == FFI_TYPE_FLOAT)
+			typenum = FFI_TYPE_UINT32;
+		if (typenum == FFI_TYPE_DOUBLE)
+			typenum = FFI_TYPE_UINT64;
+		if (typenum == FFI_TYPE_LONGDOUBLE)
+			typenum = FFI_TYPE_UINT128;
+	} else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) {
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
+		if (typenum == FFI_TYPE_LONGDOUBLE)
+			typenum = FFI_TYPE_STRUCT;
+#endif
+	}
+
+	switch (typenum) {
+#ifndef __NO_FPRS__
 	  case FFI_TYPE_FLOAT:
-	    /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32.  */
-	    if (cif->abi == FFI_LINUX_SOFT_FLOAT)
-	      goto soft_float_cif;
 	    fparg_count++;
 	    /* floating singles are not 8-aligned on stack */
 	    break;
 
 #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
 	  case FFI_TYPE_LONGDOUBLE:
-	    if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT)
-	      goto do_struct;
-	    if (cif->abi == FFI_LINUX_SOFT_FLOAT)
-	      {
-		if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3
-		  || intarg_count < NUM_GPR_ARG_REGISTERS)
-		  /* A long double in FFI_LINUX_SOFT_FLOAT can use only
-		     a set of four consecutive gprs. If we have not enough,
-		     we have to adjust the intarg_count value.  */
-		  intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count;
-		intarg_count += 4;
-		break;
-	      }
-	    else
-	      fparg_count++;
+	    fparg_count++;
 	    /* Fall thru */
 #endif
 	  case FFI_TYPE_DOUBLE:
-	    /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64.  */
-	    if (cif->abi == FFI_LINUX_SOFT_FLOAT)
-	      goto soft_double_cif;
 	    fparg_count++;
 	    /* If this FP arg is going on the stack, it must be
 	       8-byte-aligned.  */
@@ -764,10 +774,21 @@
 		&& intarg_count % 2 != 0)
 	      intarg_count++;
 	    break;
+#endif
+	  case FFI_TYPE_UINT128:
+		/* 
+		 * A long double in FFI_LINUX_SOFT_FLOAT can use only a set
+		 * of four consecutive gprs. If we do not have enough, we
+		 * have to adjust the intarg_count value.
+		 */
+		if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3
+				&& intarg_count < NUM_GPR_ARG_REGISTERS)
+			intarg_count = NUM_GPR_ARG_REGISTERS;
+		intarg_count += 4;
+		break;
 
 	  case FFI_TYPE_UINT64:
 	  case FFI_TYPE_SINT64:
-	  soft_double_cif:
 	    /* 'long long' arguments are passed as two words, but
 	       either both words must fit in registers or both go
 	       on the stack.  If they go on the stack, they must
@@ -784,9 +805,6 @@
 	    break;
 
 	  case FFI_TYPE_STRUCT:
-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
-	  do_struct:
-#endif
 	    /* We must allocate space for a copy of these to enforce
 	       pass-by-value.  Pad the space up to a multiple of 16
 	       bytes (the maximum alignment required for anything under
@@ -794,12 +812,20 @@
 	    struct_copy_size += ((*ptr)->size + 15) & ~0xF;
 	    /* Fall through (allocate space for the pointer).  */
 
-	  default:
-	  soft_float_cif:
+	  case FFI_TYPE_POINTER:
+	  case FFI_TYPE_INT:
+	  case FFI_TYPE_UINT32:
+	  case FFI_TYPE_SINT32:
+	  case FFI_TYPE_UINT16:
+	  case FFI_TYPE_SINT16:
+	  case FFI_TYPE_UINT8:
+	  case FFI_TYPE_SINT8:
 	    /* Everything else is passed as a 4-byte word in a GPR, either
 	       the object itself or a pointer to it.  */
 	    intarg_count++;
 	    break;
+	  default:
+		FFI_ASSERT (0);
 	  }
       }
   else
@@ -828,16 +854,29 @@
 	    intarg_count += ((*ptr)->size + 7) / 8;
 	    break;
 
-	  default:
+	  case FFI_TYPE_POINTER:
+	  case FFI_TYPE_UINT64:
+	  case FFI_TYPE_SINT64:
+	  case FFI_TYPE_INT:
+	  case FFI_TYPE_UINT32:
+	  case FFI_TYPE_SINT32:
+	  case FFI_TYPE_UINT16:
+	  case FFI_TYPE_SINT16:
+	  case FFI_TYPE_UINT8:
+	  case FFI_TYPE_SINT8:
 	    /* Everything else is passed as a 8-byte word in a GPR, either
 	       the object itself or a pointer to it.  */
 	    intarg_count++;
 	    break;
+	  default:
+		FFI_ASSERT (0);
 	  }
       }
 
+#ifndef __NO_FPRS__
   if (fparg_count != 0)
     flags |= FLAG_FP_ARGUMENTS;
+#endif
   if (intarg_count > 4)
     flags |= FLAG_4_GPR_ARGUMENTS;
   if (struct_copy_size != 0)
@@ -845,21 +884,27 @@
 
   if (cif->abi != FFI_LINUX64)
     {
+#ifndef __NO_FPRS__
       /* Space for the FPR registers, if needed.  */
       if (fparg_count != 0)
 	bytes += NUM_FPR_ARG_REGISTERS * sizeof (double);
+#endif
 
       /* Stack space.  */
       if (intarg_count > NUM_GPR_ARG_REGISTERS)
 	bytes += (intarg_count - NUM_GPR_ARG_REGISTERS) * sizeof (int);
+#ifndef __NO_FPRS__
       if (fparg_count > NUM_FPR_ARG_REGISTERS)
 	bytes += (fparg_count - NUM_FPR_ARG_REGISTERS) * sizeof (double);
+#endif
     }
   else
     {
+#ifndef __NO_FPRS__
       /* Space for the FPR registers, if needed.  */
       if (fparg_count != 0)
 	bytes += NUM_FPR_ARG_REGISTERS64 * sizeof (double);
+#endif
 
       /* Stack space.  */
       if (intarg_count > NUM_GPR_ARG_REGISTERS64)
@@ -906,9 +951,11 @@
   switch (cif->abi)
     {
 #ifndef POWERPC64
+# ifndef __NO_FPRS__
     case FFI_SYSV:
     case FFI_GCC_SYSV:
     case FFI_LINUX:
+# endif
     case FFI_LINUX_SOFT_FLOAT:
       ffi_call_SYSV (&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn);
       break;
@@ -1017,32 +1064,38 @@
   void **          avalue;
   ffi_type **      arg_types;
   long             i, avn;
-  long             nf;   /* number of floating registers already used */
-  long             ng;   /* number of general registers already used */
-  ffi_cif *        cif;
-  double           temp;
-  unsigned         size;
+#ifndef __NO_FPRS__
+  long             nf = 0;   /* number of floating registers already used */
+#endif
+  long             ng = 0;   /* number of general registers already used */
+
+  ffi_cif *cif = closure->cif;
+  unsigned       size     = cif->rtype->size;
+  unsigned short rtypenum = cif->rtype->type;
 
-  cif = closure->cif;
   avalue = alloca (cif->nargs * sizeof (void *));
-  size = cif->rtype->size;
 
-  nf = 0;
-  ng = 0;
+  /* First translate for softfloat/nonlinux */
+  if (cif->abi == FFI_LINUX_SOFT_FLOAT) {
+	if (rtypenum == FFI_TYPE_FLOAT)
+		rtypenum = FFI_TYPE_UINT32;
+	if (rtypenum == FFI_TYPE_DOUBLE)
+		rtypenum = FFI_TYPE_UINT64;
+	if (rtypenum == FFI_TYPE_LONGDOUBLE)
+		rtypenum = FFI_TYPE_UINT128;
+  } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) {
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
+	if (rtypenum == FFI_TYPE_LONGDOUBLE)
+		rtypenum = FFI_TYPE_STRUCT;
+#endif
+  }
+
 
   /* Copy the caller's structure return value address so that the closure
      returns the data directly to the caller.
      For FFI_SYSV the result is passed in r3/r4 if the struct size is less
      or equal 8 bytes.  */
-
-  if ((cif->rtype->type == FFI_TYPE_STRUCT
-       && !((cif->abi == FFI_SYSV) && (size <= 8)))
-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
-      || (cif->rtype->type == FFI_TYPE_LONGDOUBLE
-	  && cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT)
-#endif
-      )
-    {
+  if (rtypenum == FFI_TYPE_STRUCT && ((cif->abi != FFI_SYSV) || (size > 8))) {
       rvalue = (void *) *pgr;
       ng++;
       pgr++;
@@ -1053,10 +1106,109 @@
   arg_types = cif->arg_types;
 
   /* Grab the addresses of the arguments from the stack frame.  */
-  while (i < avn)
-    {
-      switch (arg_types[i]->type)
-	{
+  while (i < avn) {
+      unsigned short typenum = arg_types[i]->type;
+
+      /* We may need to handle some values depending on ABI */
+      if (cif->abi == FFI_LINUX_SOFT_FLOAT) {
+		if (typenum == FFI_TYPE_FLOAT)
+			typenum = FFI_TYPE_UINT32;
+		if (typenum == FFI_TYPE_DOUBLE)
+			typenum = FFI_TYPE_UINT64;
+		if (typenum == FFI_TYPE_LONGDOUBLE)
+			typenum = FFI_TYPE_UINT128;
+      } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) {
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
+		if (typenum == FFI_TYPE_LONGDOUBLE)
+			typenum = FFI_TYPE_STRUCT;
+#endif
+      }
+
+      switch (typenum) {
+#ifndef __NO_FPRS__
+	case FFI_TYPE_FLOAT:
+	  /* unfortunately float values are stored as doubles
+	   * in the ffi_closure_SYSV code (since we don't check
+	   * the type in that routine).
+	   */
+
+	  /* there are 8 64bit floating point registers */
+
+	  if (nf < 8)
+	    {
+	      double temp = pfr->d;
+	      pfr->f = (float) temp;
+	      avalue[i] = pfr;
+	      nf++;
+	      pfr++;
+	    }
+	  else
+	    {
+	      /* FIXME? here we are really changing the values
+	       * stored in the original calling routines outgoing
+	       * parameter stack.  This is probably a really
+	       * naughty thing to do but...
+	       */
+	      avalue[i] = pst;
+	      pst += 1;
+	    }
+	  break;
+
+	case FFI_TYPE_DOUBLE:
+	  /* On the outgoing stack all values are aligned to 8 */
+	  /* there are 8 64bit floating point registers */
+
+	  if (nf < 8)
+	    {
+	      avalue[i] = pfr;
+	      nf++;
+	      pfr++;
+	    }
+	  else
+	    {
+	      if (((long) pst) & 4)
+		pst++;
+	      avalue[i] = pst;
+	      pst += 2;
+	    }
+	  break;
+
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
+	case FFI_TYPE_LONGDOUBLE:
+	  if (nf < 7)
+	    {
+	      avalue[i] = pfr;
+	      pfr += 2;
+	      nf += 2;
+	    }
+	  else
+	    {
+	      if (((long) pst) & 4)
+		pst++;
+	      avalue[i] = pst;
+	      pst += 4;
+	      nf = 8;
+	    }
+	  break;
+#endif
+#endif /* have FPRS */
+
+	case FFI_TYPE_UINT128:
+		/* 
+		 * Test if for the whole long double, 4 gprs are available.
+		 * otherwise the stuff ends up on the stack.
+		 */
+		if (ng < 5) {
+			avalue[i] = pgr;
+			pgr += 4;
+			ng += 4;
+		} else {
+			avalue[i] = pst;
+			pst += 4;
+			ng = 8+4;
+		}
+		break;
+
 	case FFI_TYPE_SINT8:
 	case FFI_TYPE_UINT8:
 	  /* there are 8 gpr registers used to pass values */
@@ -1092,7 +1244,6 @@
 	case FFI_TYPE_SINT32:
 	case FFI_TYPE_UINT32:
 	case FFI_TYPE_POINTER:
-	soft_float_closure:
 	  /* there are 8 gpr registers used to pass values */
 	  if (ng < 8)
 	    {
@@ -1108,9 +1259,6 @@
 	  break;
 
 	case FFI_TYPE_STRUCT:
-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
-	do_struct:
-#endif
 	  /* Structs are passed by reference. The address will appear in a
 	     gpr if it is one of the first 8 arguments.  */
 	  if (ng < 8)
@@ -1128,7 +1276,6 @@
 
 	case FFI_TYPE_SINT64:
 	case FFI_TYPE_UINT64:
-	soft_double_closure:
 	  /* passing long long ints are complex, they must
 	   * be passed in suitable register pairs such as
 	   * (r3,r4) or (r5,r6) or (r6,r7), or (r7,r8) or (r9,r10)
@@ -1160,99 +1307,8 @@
 	    }
 	  break;
 
-	case FFI_TYPE_FLOAT:
-	  /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32.  */
-	  if (cif->abi == FFI_LINUX_SOFT_FLOAT)
-	    goto soft_float_closure;
-	  /* unfortunately float values are stored as doubles
-	   * in the ffi_closure_SYSV code (since we don't check
-	   * the type in that routine).
-	   */
-
-	  /* there are 8 64bit floating point registers */
-
-	  if (nf < 8)
-	    {
-	      temp = pfr->d;
-	      pfr->f = (float) temp;
-	      avalue[i] = pfr;
-	      nf++;
-	      pfr++;
-	    }
-	  else
-	    {
-	      /* FIXME? here we are really changing the values
-	       * stored in the original calling routines outgoing
-	       * parameter stack.  This is probably a really
-	       * naughty thing to do but...
-	       */
-	      avalue[i] = pst;
-	      pst += 1;
-	    }
-	  break;
-
-	case FFI_TYPE_DOUBLE:
-	  /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64.  */
-	  if (cif->abi == FFI_LINUX_SOFT_FLOAT)
-	    goto soft_double_closure;
-	  /* On the outgoing stack all values are aligned to 8 */
-	  /* there are 8 64bit floating point registers */
-
-	  if (nf < 8)
-	    {
-	      avalue[i] = pfr;
-	      nf++;
-	      pfr++;
-	    }
-	  else
-	    {
-	      if (((long) pst) & 4)
-		pst++;
-	      avalue[i] = pst;
-	      pst += 2;
-	    }
-	  break;
-
-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
-	case FFI_TYPE_LONGDOUBLE:
-	  if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT)
-	    goto do_struct;
-	  if (cif->abi == FFI_LINUX_SOFT_FLOAT)
-	    { /* Test if for the whole long double, 4 gprs are available.
-		 otherwise the stuff ends up on the stack.  */
-	      if (ng < 5)
-		{
-		  avalue[i] = pgr;
-		  pgr += 4;
-		  ng += 4;
-		}
-	      else
-		{
-		  avalue[i] = pst;
-		  pst += 4;
-		  ng = 8;
-		}
-	      break;
-	    }
-	  if (nf < 7)
-	    {
-	      avalue[i] = pfr;
-	      pfr += 2;
-	      nf += 2;
-	    }
-	  else
-	    {
-	      if (((long) pst) & 4)
-		pst++;
-	      avalue[i] = pst;
-	      pst += 4;
-	      nf = 8;
-	    }
-	  break;
-#endif
-
 	default:
-	  FFI_ASSERT (0);
+		FFI_ASSERT (0);
 	}
 
       i++;
@@ -1269,39 +1325,9 @@
      already used and we never have a struct with size zero. That is the reason
      for the subtraction of 1. See the comment in ffitarget.h about ordering.
   */
-  if (cif->abi == FFI_SYSV && cif->rtype->type == FFI_TYPE_STRUCT
-      && size <= 8)
+  if (cif->abi == FFI_SYSV && rtypenum == FFI_TYPE_STRUCT && size <= 8)
     return (FFI_SYSV_TYPE_SMALL_STRUCT - 1) + size;
-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
-  else if (cif->rtype->type == FFI_TYPE_LONGDOUBLE
-	   && cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT)
-    return FFI_TYPE_STRUCT;
-#endif
-  /* With FFI_LINUX_SOFT_FLOAT floats and doubles are handled like UINT32
-     respectivley UINT64.  */
-  if (cif->abi == FFI_LINUX_SOFT_FLOAT)
-    {
-      switch (cif->rtype->type)
-	{
-	case FFI_TYPE_FLOAT:
-	  return FFI_TYPE_UINT32;
-	  break;
-	case FFI_TYPE_DOUBLE:
-	  return FFI_TYPE_UINT64;
-	  break;
-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
-	case FFI_TYPE_LONGDOUBLE:
-	  return FFI_TYPE_UINT128;
-	  break;
-#endif
-	default:
-	  return cif->rtype->type;
-	}
-    }
-  else
-    {
-      return cif->rtype->type;
-    }
+  return rtypenum;
 }
 
 int FFI_HIDDEN ffi_closure_helper_LINUX64 (ffi_closure *, void *,
--- libffi-3.0.10.orig/src/powerpc/ppc_closure.S
+++ libffi-3.0.10/src/powerpc/ppc_closure.S
@@ -122,22 +122,41 @@
 	blr
 
 # case FFI_TYPE_FLOAT
+#ifndef __NO_FPRS__
 	lfs %f1,112+0(%r1)
 	mtlr %r0
 	addi %r1,%r1,144
+#else
+	nop
+	nop
+	nop
+#endif
 	blr
 
 # case FFI_TYPE_DOUBLE
+#ifndef __NO_FPRS__
 	lfd %f1,112+0(%r1)
 	mtlr %r0
 	addi %r1,%r1,144
+#else
+	nop
+	nop
+	nop
+#endif
 	blr
 
 # case FFI_TYPE_LONGDOUBLE
+#ifndef __NO_FPRS__
 	lfd %f1,112+0(%r1)
 	lfd %f2,112+8(%r1)
 	mtlr %r0
 	b .Lfinish
+#else
+	nop
+	nop
+	nop
+	blr
+#endif
 
 # case FFI_TYPE_UINT8
 	lbz %r3,112+3(%r1)
--- libffi-3.0.10.orig/src/powerpc/ffitarget.h
+++ libffi-3.0.10/src/powerpc/ffitarget.h
@@ -60,18 +60,14 @@
   FFI_LINUX64,
   FFI_LINUX,
   FFI_LINUX_SOFT_FLOAT,
-# ifdef POWERPC64
+# if defined(POWERPC64)
   FFI_DEFAULT_ABI = FFI_LINUX64,
-# else
-#  if (!defined(__NO_FPRS__) && (__LDBL_MANT_DIG__ == 106))
-  FFI_DEFAULT_ABI = FFI_LINUX,
-#  else
-#   ifdef __NO_FPRS__
+# elif defined(__NO_FPRS__)
   FFI_DEFAULT_ABI = FFI_LINUX_SOFT_FLOAT,
-#   else
+# elif (__LDBL_MANT_DIG__ == 106)
+  FFI_DEFAULT_ABI = FFI_LINUX,
+# else
   FFI_DEFAULT_ABI = FFI_GCC_SYSV,
-#   endif
-#  endif
 # endif
 #endif
 
--- libffi-3.0.10.orig/src/cris/ffi.c
+++ libffi-3.0.10/src/cris/ffi.c
@@ -153,21 +153,24 @@
   return (struct_count);
 }
 
-ffi_status
-ffi_prep_cif (ffi_cif * cif,
-	      ffi_abi abi, unsigned int nargs,
-	      ffi_type * rtype, ffi_type ** atypes)
+ffi_status FFI_HIDDEN
+ffi_prep_cif_core (ffi_cif * cif,
+	           ffi_abi abi, unsigned int isvariadic,
+		   unsigned int nfixedargs, unsigned int ntotalargs,
+	           ffi_type * rtype, ffi_type ** atypes)
 {
   unsigned bytes = 0;
   unsigned int i;
   ffi_type **ptr;
 
   FFI_ASSERT (cif != NULL);
+  FFI_ASSERT((!isvariadic) || (nfixedargs >= 1));
+  FFI_ASSERT(nfixedargs <= ntotalargs);
   FFI_ASSERT (abi > FFI_FIRST_ABI && abi < FFI_LAST_ABI);
 
   cif->abi = abi;
   cif->arg_types = atypes;
-  cif->nargs = nargs;
+  cif->nargs = ntotalargs;
   cif->rtype = rtype;
 
   cif->flags = 0;
--- libffi-3.0.10.orig/src/sparc/v8.S
+++ libffi-3.0.10/src/sparc/v8.S
@@ -213,6 +213,14 @@
 	be,a	done1
 	 ldd	[%fp-8], %i0
 
+	cmp	%o0, FFI_TYPE_UINT64
+	be,a	done1
+	 ldd	[%fp-8], %i0
+
+	cmp	%o0, FFI_TYPE_UINT64
+	be,a	done1
+	 ldd	[%fp-8], %i0
+
 	ld	[%fp-8], %i0
 done1:
 	jmp	%i7+8
--- libffi-3.0.10.orig/include/ffi_common.h
+++ libffi-3.0.10/include/ffi_common.h
@@ -75,6 +75,8 @@
 
 /* Perform machine dependent cif processing */
 ffi_status ffi_prep_cif_machdep(ffi_cif *cif);
+ffi_status ffi_prep_cif_machdep_var(ffi_cif *cif,
+	 unsigned int nfixedargs, unsigned int ntotalargs);
 
 /* Extended cif, used in callback from assembly routine */
 typedef struct
--- libffi-3.0.10.orig/include/ffi.h.in
+++ libffi-3.0.10/include/ffi.h.in
@@ -207,6 +207,15 @@
 #endif
 } ffi_cif;
 
+/* Used internally, but overridden by some architectures */
+ffi_status ffi_prep_cif_core(ffi_cif *cif,
+			     ffi_abi abi,
+			     unsigned int isvariadic,
+			     unsigned int nfixedargs,
+			     unsigned int ntotalargs,
+			     ffi_type *rtype,
+			     ffi_type **atypes);
+
 /* ---- Definitions for the raw API -------------------------------------- */
 
 #ifndef FFI_SIZEOF_ARG
@@ -384,6 +393,13 @@
 			ffi_type *rtype,
 			ffi_type **atypes);
 
+ffi_status ffi_prep_cif_var(ffi_cif *cif,
+			    ffi_abi abi,
+			    unsigned int nfixedargs,
+			    unsigned int ntotalargs,
+			    ffi_type *rtype,
+			    ffi_type **atypes);
+
 void ffi_call(ffi_cif *cif,
 	      void (*fn)(void),
 	      void *rvalue,
--- libffi-3.0.10.orig/include/Makefile.am
+++ libffi-3.0.10/include/Makefile.am
@@ -5,5 +5,5 @@
 DISTCLEANFILES=ffitarget.h
 EXTRA_DIST=ffi.h.in ffi_common.h
 
-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
+includesdir = $(includedir)
 nodist_includes_HEADERS = ffi.h ffitarget.h
--- libffi-3.0.10.orig/include/Makefile.in
+++ libffi-3.0.10/include/Makefile.in
@@ -221,7 +221,7 @@
 AUTOMAKE_OPTIONS = foreign
 DISTCLEANFILES = ffitarget.h
 EXTRA_DIST = ffi.h.in ffi_common.h
-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
+includesdir = $(includedir)
 nodist_includes_HEADERS = ffi.h ffitarget.h
 all: all-am
 
--- libffi-3.0.10.orig/testsuite/libffi.call/cls_longdouble_va.c
+++ libffi-3.0.10/testsuite/libffi.call/cls_longdouble_va.c
@@ -7,7 +7,6 @@
 /* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
 /* { dg-output "" { xfail avr32*-*-* x86_64-*-mingw* } } */
 /* { dg-output "" { xfail mips-sgi-irix6* } } PR libffi/46660 */
-/* { dg-skip-if "" arm*-*-* { "-mfloat-abi=hard" } { "" } } */
 
 #include "ffitest.h"
 
@@ -37,7 +36,8 @@
 	arg_types[1] = &ffi_type_longdouble;
 	arg_types[2] = NULL;
 
-	CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ffi_type_sint,
+	/* This printf call is variadic */
+	CHECK(ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, 1, 2, &ffi_type_sint,
 		arg_types) == FFI_OK);
 
 	args[0] = &format;
@@ -49,6 +49,10 @@
 	printf("res: %d\n", (int) res);
 	// { dg-output "\nres: 4" }
 
+	/* The call to cls_longdouble_va_fn is static, so have to use a normal prep_cif */
+	CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ffi_type_sint,
+		arg_types) == FFI_OK);
+
 	CHECK(ffi_prep_closure_loc(pcl, &cif, cls_longdouble_va_fn, NULL, code) == FFI_OK);
 
 	res	= ((int(*)(char*, long double))(code))(format, ldArg);
--- libffi-3.0.10.orig/testsuite/libffi.call/float_va.c
+++ libffi-3.0.10/testsuite/libffi.call/float_va.c
@@ -0,0 +1,107 @@
+/* Area:        fp and variadics
+   Purpose:     check fp inputs and returns work on variadics, even the fixed params
+   Limitations: None
+   PR:          none
+   Originator:  <david.gilbert@linaro.org> 2011-01-25
+
+   Intended to stress the difference in ABI on ARM vfp
+*/
+
+/* { dg-do run } */
+
+#include <stdarg.h>
+
+#include "ffitest.h"
+
+/* prints out all the parameters, and returns the sum of them all.
+ * 'x' is the number of variadic parameters all of which are double in this test
+ */
+double float_va_fn(unsigned int x, double y,...)
+{
+  double total=0.0;
+  va_list ap;
+  unsigned int i;
+
+  total+=(double)x;
+  total+=y;
+
+  printf("%u: %.1lf :", x, y);
+
+  va_start(ap, y);
+  for(i=0;i<x;i++)
+  {
+    double arg=va_arg(ap, double);
+    total+=arg;
+    printf(" %d:%.1lf ", i, arg);
+  }
+  va_end(ap);
+  
+  printf(" total: %.1lf\n", total);
+
+  return total;
+}
+
+int main (void)
+{
+  ffi_cif    cif;
+
+  ffi_type    *arg_types[5];
+  void        *values[5];
+  double        doubles[5];
+  unsigned int firstarg;
+  double        resfp;
+
+  /* First test, pass float_va_fn(0,2.0) - note there are no actual
+   * variadic parameters, but it's declared variadic so the ABI may be
+   * different. */
+  /* Call it statically and then via ffi */
+  resfp=float_va_fn(0,2.0);
+  // { dg-output "0: 2.0 : total: 2.0" }
+  printf("compiled: %.1lf\n", resfp);
+  // { dg-output "\ncompiled: 2.0" }
+
+  arg_types[0] = &ffi_type_uint;
+  arg_types[1] = &ffi_type_double;
+  arg_types[2] = NULL;
+  CHECK(ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, 2, 2,
+        &ffi_type_double, arg_types) == FFI_OK);
+
+  firstarg = 0;
+  doubles[0] = 2.0;
+  values[0] = &firstarg;
+  values[1] = &doubles[0];
+  ffi_call(&cif, FFI_FN(float_va_fn), &resfp, values); 
+  // { dg-output "\n0: 2.0 : total: 2.0" }
+  printf("ffi: %.1lf\n", resfp);
+  // { dg-output "\nffi: 2.0" }
+
+  /* Second test, float_va_fn(2,2.0,3.0,4.0), now with variadic params */
+  /* Call it statically and then via ffi */
+  resfp=float_va_fn(2,2.0,3.0,4.0);
+  // { dg-output "\n2: 2.0 : 0:3.0  1:4.0  total: 11.0" }
+  printf("compiled: %.1lf\n", resfp);
+  // { dg-output "\ncompiled: 11.0" }
+
+  arg_types[0] = &ffi_type_uint;
+  arg_types[1] = &ffi_type_double;
+  arg_types[2] = &ffi_type_double;
+  arg_types[3] = &ffi_type_double;
+  arg_types[4] = NULL;
+  CHECK(ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, 2, 4,
+        &ffi_type_double, arg_types) == FFI_OK);
+
+  firstarg = 2;
+  doubles[0] = 2.0;
+  doubles[1] = 3.0;
+  doubles[2] = 4.0;
+  values[0] = &firstarg;
+  values[1] = &doubles[0];
+  values[2] = &doubles[1];
+  values[3] = &doubles[2];
+  ffi_call(&cif, FFI_FN(float_va_fn), &resfp, values); 
+  // { dg-output "\n2: 2.0 : 0:3.0  1:4.0  total: 11.0" }
+  printf("ffi: %.1lf\n", resfp);
+  // { dg-output "\nffi: 11.0" }
+
+  exit(0);
+}
--- libffi-3.0.10.orig/testsuite/libffi.call/cls_double_va.c
+++ libffi-3.0.10/testsuite/libffi.call/cls_double_va.c
@@ -7,7 +7,6 @@
 /* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
 /* { dg-output "" { xfail avr32*-*-* } } */
 /* { dg-output "" { xfail mips-sgi-irix6* } } PR libffi/46660 */
-/* { dg-skip-if "" arm*-*-* { "-mfloat-abi=hard" } { "" } } */
 
 #include "ffitest.h"
 
@@ -37,7 +36,8 @@
 	arg_types[1] = &ffi_type_double;
 	arg_types[2] = NULL;
 
-	CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ffi_type_sint,
+	/* This printf call is variadic */
+	CHECK(ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, 1, 2, &ffi_type_sint,
 		arg_types) == FFI_OK);
 
 	args[0] = &format;
@@ -49,6 +49,10 @@
 	printf("res: %d\n", (int) res);
 	// { dg-output "\nres: 4" }
 
+	/* The call to cls_double_va_fn is static, so have to use a normal prep_cif */
+	CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ffi_type_sint,
+		arg_types) == FFI_OK);
+
 	CHECK(ffi_prep_closure_loc(pcl, &cif, cls_double_va_fn, NULL, code) == FFI_OK);
 
 	res	= ((int(*)(char*, double))(code))(format, doubleArg);