Index: libffi/ChangeLog
===================================================================
--- libffi.orig/ChangeLog
+++ libffi/ChangeLog
@@ -1,3 +1,13 @@
+2011-08-32  Anthony Green  <green@moxielogic.com>
+
+	* libtool-version: Update.
+	* Makefile.am (nodist_libffi_la_SOURCES): Add src/debug.c if
+	FFI_DEBUG.
+	(libffi_la_SOURCES): Remove src/debug.c
+	(EXTRA_DIST): Add src/debug.c
+	* Makefile.in: Rebuilt.
+	* README: Update for 3.0.11.
+
 2011-08-22  Jasper Lievisse Adriaanse <jasper@openbsd.org>
 
 	* configure.ac: Add OpenBSD/hppa and OpenBSD/powerpc support.
Index: libffi/Makefile.am
===================================================================
--- libffi.orig/Makefile.am
+++ libffi/Makefile.am
@@ -31,9 +31,7 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change
 	src/frv/ffitarget.h src/dlmalloc.c src/moxie/ffi.c		\
 	src/moxie/eabi.S libtool-version ChangeLog.libffi		\
 	m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4	\
-	m4/ltversion.m4 build-ios.sh src/arm/gentramp.sh src/debug.c    \
-	msvcc.sh
-
+	m4/ltversion.m4 build-ios.sh src/arm/gentramp.sh msvcc.sh
 
 info_TEXINFOS = doc/libffi.texi
 
@@ -88,7 +86,7 @@ ACLOCAL_AMFLAGS=$(ACLOCAL_AMFLAGS) -I m4
 lib_LTLIBRARIES = libffi.la
 noinst_LTLIBRARIES = libffi_convenience.la
 
-libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c \
+libffi_la_SOURCES = src/prep_cif.c src/types.c \
 		src/raw_api.c src/java_raw_api.c src/closures.c
 
 pkgconfigdir = $(libdir)/pkgconfig
@@ -96,6 +94,10 @@ pkgconfig_DATA = libffi.pc
 
 nodist_libffi_la_SOURCES =
 
+if FFI_DEBUG
+nodist_libffi_la_SOURCES += src/debug.c
+endif
+
 if MIPS
 nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
 endif
Index: libffi/Makefile.in
===================================================================
--- libffi.orig/Makefile.in
+++ libffi/Makefile.in
@@ -36,35 +36,36 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-@MIPS_TRUE@am__append_1 = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
-@X86_TRUE@am__append_2 = src/x86/ffi.c src/x86/sysv.S
-@X86_FREEBSD_TRUE@am__append_3 = src/x86/ffi.c src/x86/freebsd.S
-@X86_WIN32_TRUE@am__append_4 = src/x86/ffi.c src/x86/win32.S
-@X86_WIN64_TRUE@am__append_5 = src/x86/ffi.c src/x86/win64.S
-@X86_DARWIN_TRUE@am__append_6 = src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
-@SPARC_TRUE@am__append_7 = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
-@ALPHA_TRUE@am__append_8 = src/alpha/ffi.c src/alpha/osf.S
-@IA64_TRUE@am__append_9 = src/ia64/ffi.c src/ia64/unix.S
-@M32R_TRUE@am__append_10 = src/m32r/sysv.S src/m32r/ffi.c
-@M68K_TRUE@am__append_11 = src/m68k/ffi.c src/m68k/sysv.S
-@POWERPC_TRUE@am__append_12 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
-@POWERPC_AIX_TRUE@am__append_13 = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
-@POWERPC_DARWIN_TRUE@am__append_14 = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
-@POWERPC_FREEBSD_TRUE@am__append_15 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
-@ARM_TRUE@am__append_16 = src/arm/sysv.S src/arm/ffi.c
-@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__append_17 = src/arm/trampoline.S
-@AVR32_TRUE@am__append_18 = src/avr32/sysv.S src/avr32/ffi.c
-@LIBFFI_CRIS_TRUE@am__append_19 = src/cris/sysv.S src/cris/ffi.c
-@FRV_TRUE@am__append_20 = src/frv/eabi.S src/frv/ffi.c
-@S390_TRUE@am__append_21 = src/s390/sysv.S src/s390/ffi.c
-@X86_64_TRUE@am__append_22 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
-@SH_TRUE@am__append_23 = src/sh/sysv.S src/sh/ffi.c
-@SH64_TRUE@am__append_24 = src/sh64/sysv.S src/sh64/ffi.c
-@PA_LINUX_TRUE@am__append_25 = src/pa/linux.S src/pa/ffi.c
-@PA_HPUX_TRUE@am__append_26 = src/pa/hpux32.S src/pa/ffi.c
+@FFI_DEBUG_TRUE@am__append_1 = src/debug.c
+@MIPS_TRUE@am__append_2 = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
+@X86_TRUE@am__append_3 = src/x86/ffi.c src/x86/sysv.S
+@X86_FREEBSD_TRUE@am__append_4 = src/x86/ffi.c src/x86/freebsd.S
+@X86_WIN32_TRUE@am__append_5 = src/x86/ffi.c src/x86/win32.S
+@X86_WIN64_TRUE@am__append_6 = src/x86/ffi.c src/x86/win64.S
+@X86_DARWIN_TRUE@am__append_7 = src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
+@SPARC_TRUE@am__append_8 = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
+@ALPHA_TRUE@am__append_9 = src/alpha/ffi.c src/alpha/osf.S
+@IA64_TRUE@am__append_10 = src/ia64/ffi.c src/ia64/unix.S
+@M32R_TRUE@am__append_11 = src/m32r/sysv.S src/m32r/ffi.c
+@M68K_TRUE@am__append_12 = src/m68k/ffi.c src/m68k/sysv.S
+@POWERPC_TRUE@am__append_13 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
+@POWERPC_AIX_TRUE@am__append_14 = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
+@POWERPC_DARWIN_TRUE@am__append_15 = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
+@POWERPC_FREEBSD_TRUE@am__append_16 = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
+@ARM_TRUE@am__append_17 = src/arm/sysv.S src/arm/ffi.c
+@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__append_18 = src/arm/trampoline.S
+@AVR32_TRUE@am__append_19 = src/avr32/sysv.S src/avr32/ffi.c
+@LIBFFI_CRIS_TRUE@am__append_20 = src/cris/sysv.S src/cris/ffi.c
+@FRV_TRUE@am__append_21 = src/frv/eabi.S src/frv/ffi.c
+@S390_TRUE@am__append_22 = src/s390/sysv.S src/s390/ffi.c
+@X86_64_TRUE@am__append_23 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
+@SH_TRUE@am__append_24 = src/sh/sysv.S src/sh/ffi.c
+@SH64_TRUE@am__append_25 = src/sh64/sysv.S src/sh64/ffi.c
+@PA_LINUX_TRUE@am__append_26 = src/pa/linux.S src/pa/ffi.c
+@PA_HPUX_TRUE@am__append_27 = src/pa/hpux32.S src/pa/ffi.c
 # Build debug. Define FFI_DEBUG on the commandline so that, when building with
 # MSVC, it can link against the debug CRT.
-@FFI_DEBUG_TRUE@am__append_27 = -DFFI_DEBUG
+@FFI_DEBUG_TRUE@am__append_28 = -DFFI_DEBUG
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in $(srcdir)/doc/stamp-vti \
@@ -111,47 +112,48 @@ am__installdirs = "$(DESTDIR)$(libdir)" 
 LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
 libffi_la_LIBADD =
 am__dirstamp = $(am__leading_dot)dirstamp
-am_libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
-	src/raw_api.lo src/java_raw_api.lo src/closures.lo
-@MIPS_TRUE@am__objects_1 = src/mips/ffi.lo src/mips/o32.lo \
+am_libffi_la_OBJECTS = src/prep_cif.lo src/types.lo src/raw_api.lo \
+	src/java_raw_api.lo src/closures.lo
+@FFI_DEBUG_TRUE@am__objects_1 = src/debug.lo
+@MIPS_TRUE@am__objects_2 = src/mips/ffi.lo src/mips/o32.lo \
 @MIPS_TRUE@	src/mips/n32.lo
-@X86_TRUE@am__objects_2 = src/x86/ffi.lo src/x86/sysv.lo
-@X86_FREEBSD_TRUE@am__objects_3 = src/x86/ffi.lo src/x86/freebsd.lo
-@X86_WIN32_TRUE@am__objects_4 = src/x86/ffi.lo src/x86/win32.lo
-@X86_WIN64_TRUE@am__objects_5 = src/x86/ffi.lo src/x86/win64.lo
-@X86_DARWIN_TRUE@am__objects_6 = src/x86/ffi.lo src/x86/darwin.lo \
+@X86_TRUE@am__objects_3 = src/x86/ffi.lo src/x86/sysv.lo
+@X86_FREEBSD_TRUE@am__objects_4 = src/x86/ffi.lo src/x86/freebsd.lo
+@X86_WIN32_TRUE@am__objects_5 = src/x86/ffi.lo src/x86/win32.lo
+@X86_WIN64_TRUE@am__objects_6 = src/x86/ffi.lo src/x86/win64.lo
+@X86_DARWIN_TRUE@am__objects_7 = src/x86/ffi.lo src/x86/darwin.lo \
 @X86_DARWIN_TRUE@	src/x86/ffi64.lo src/x86/darwin64.lo
-@SPARC_TRUE@am__objects_7 = src/sparc/ffi.lo src/sparc/v8.lo \
+@SPARC_TRUE@am__objects_8 = src/sparc/ffi.lo src/sparc/v8.lo \
 @SPARC_TRUE@	src/sparc/v9.lo
-@ALPHA_TRUE@am__objects_8 = src/alpha/ffi.lo src/alpha/osf.lo
-@IA64_TRUE@am__objects_9 = src/ia64/ffi.lo src/ia64/unix.lo
-@M32R_TRUE@am__objects_10 = src/m32r/sysv.lo src/m32r/ffi.lo
-@M68K_TRUE@am__objects_11 = src/m68k/ffi.lo src/m68k/sysv.lo
-@POWERPC_TRUE@am__objects_12 = src/powerpc/ffi.lo src/powerpc/sysv.lo \
+@ALPHA_TRUE@am__objects_9 = src/alpha/ffi.lo src/alpha/osf.lo
+@IA64_TRUE@am__objects_10 = src/ia64/ffi.lo src/ia64/unix.lo
+@M32R_TRUE@am__objects_11 = src/m32r/sysv.lo src/m32r/ffi.lo
+@M68K_TRUE@am__objects_12 = src/m68k/ffi.lo src/m68k/sysv.lo
+@POWERPC_TRUE@am__objects_13 = src/powerpc/ffi.lo src/powerpc/sysv.lo \
 @POWERPC_TRUE@	src/powerpc/ppc_closure.lo \
 @POWERPC_TRUE@	src/powerpc/linux64.lo \
 @POWERPC_TRUE@	src/powerpc/linux64_closure.lo
-@POWERPC_AIX_TRUE@am__objects_13 = src/powerpc/ffi_darwin.lo \
+@POWERPC_AIX_TRUE@am__objects_14 = src/powerpc/ffi_darwin.lo \
 @POWERPC_AIX_TRUE@	src/powerpc/aix.lo \
 @POWERPC_AIX_TRUE@	src/powerpc/aix_closure.lo
-@POWERPC_DARWIN_TRUE@am__objects_14 = src/powerpc/ffi_darwin.lo \
+@POWERPC_DARWIN_TRUE@am__objects_15 = src/powerpc/ffi_darwin.lo \
 @POWERPC_DARWIN_TRUE@	src/powerpc/darwin.lo \
 @POWERPC_DARWIN_TRUE@	src/powerpc/darwin_closure.lo
-@POWERPC_FREEBSD_TRUE@am__objects_15 = src/powerpc/ffi.lo \
+@POWERPC_FREEBSD_TRUE@am__objects_16 = src/powerpc/ffi.lo \
 @POWERPC_FREEBSD_TRUE@	src/powerpc/sysv.lo \
 @POWERPC_FREEBSD_TRUE@	src/powerpc/ppc_closure.lo
-@ARM_TRUE@am__objects_16 = src/arm/sysv.lo src/arm/ffi.lo
-@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__objects_17 = src/arm/trampoline.lo
-@AVR32_TRUE@am__objects_18 = src/avr32/sysv.lo src/avr32/ffi.lo
-@LIBFFI_CRIS_TRUE@am__objects_19 = src/cris/sysv.lo src/cris/ffi.lo
-@FRV_TRUE@am__objects_20 = src/frv/eabi.lo src/frv/ffi.lo
-@S390_TRUE@am__objects_21 = src/s390/sysv.lo src/s390/ffi.lo
-@X86_64_TRUE@am__objects_22 = src/x86/ffi64.lo src/x86/unix64.lo \
+@ARM_TRUE@am__objects_17 = src/arm/sysv.lo src/arm/ffi.lo
+@ARM_TRUE@@FFI_EXEC_TRAMPOLINE_TABLE_TRUE@am__objects_18 = src/arm/trampoline.lo
+@AVR32_TRUE@am__objects_19 = src/avr32/sysv.lo src/avr32/ffi.lo
+@LIBFFI_CRIS_TRUE@am__objects_20 = src/cris/sysv.lo src/cris/ffi.lo
+@FRV_TRUE@am__objects_21 = src/frv/eabi.lo src/frv/ffi.lo
+@S390_TRUE@am__objects_22 = src/s390/sysv.lo src/s390/ffi.lo
+@X86_64_TRUE@am__objects_23 = src/x86/ffi64.lo src/x86/unix64.lo \
 @X86_64_TRUE@	src/x86/ffi.lo src/x86/sysv.lo
-@SH_TRUE@am__objects_23 = src/sh/sysv.lo src/sh/ffi.lo
-@SH64_TRUE@am__objects_24 = src/sh64/sysv.lo src/sh64/ffi.lo
-@PA_LINUX_TRUE@am__objects_25 = src/pa/linux.lo src/pa/ffi.lo
-@PA_HPUX_TRUE@am__objects_26 = src/pa/hpux32.lo src/pa/ffi.lo
+@SH_TRUE@am__objects_24 = src/sh/sysv.lo src/sh/ffi.lo
+@SH64_TRUE@am__objects_25 = src/sh64/sysv.lo src/sh64/ffi.lo
+@PA_LINUX_TRUE@am__objects_26 = src/pa/linux.lo src/pa/ffi.lo
+@PA_HPUX_TRUE@am__objects_27 = src/pa/hpux32.lo src/pa/ffi.lo
 nodist_libffi_la_OBJECTS = $(am__objects_1) $(am__objects_2) \
 	$(am__objects_3) $(am__objects_4) $(am__objects_5) \
 	$(am__objects_6) $(am__objects_7) $(am__objects_8) \
@@ -160,17 +162,18 @@ nodist_libffi_la_OBJECTS = $(am__objects
 	$(am__objects_15) $(am__objects_16) $(am__objects_17) \
 	$(am__objects_18) $(am__objects_19) $(am__objects_20) \
 	$(am__objects_21) $(am__objects_22) $(am__objects_23) \
-	$(am__objects_24) $(am__objects_25) $(am__objects_26)
+	$(am__objects_24) $(am__objects_25) $(am__objects_26) \
+	$(am__objects_27)
 libffi_la_OBJECTS = $(am_libffi_la_OBJECTS) \
 	$(nodist_libffi_la_OBJECTS)
 libffi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(libffi_la_LDFLAGS) $(LDFLAGS) -o $@
 libffi_convenience_la_LIBADD =
-am__objects_27 = src/debug.lo src/prep_cif.lo src/types.lo \
-	src/raw_api.lo src/java_raw_api.lo src/closures.lo
-am_libffi_convenience_la_OBJECTS = $(am__objects_27)
-am__objects_28 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
+am__objects_28 = src/prep_cif.lo src/types.lo src/raw_api.lo \
+	src/java_raw_api.lo src/closures.lo
+am_libffi_convenience_la_OBJECTS = $(am__objects_28)
+am__objects_29 = $(am__objects_1) $(am__objects_2) $(am__objects_3) \
 	$(am__objects_4) $(am__objects_5) $(am__objects_6) \
 	$(am__objects_7) $(am__objects_8) $(am__objects_9) \
 	$(am__objects_10) $(am__objects_11) $(am__objects_12) \
@@ -178,8 +181,8 @@ am__objects_28 = $(am__objects_1) $(am__
 	$(am__objects_16) $(am__objects_17) $(am__objects_18) \
 	$(am__objects_19) $(am__objects_20) $(am__objects_21) \
 	$(am__objects_22) $(am__objects_23) $(am__objects_24) \
-	$(am__objects_25) $(am__objects_26)
-nodist_libffi_convenience_la_OBJECTS = $(am__objects_28)
+	$(am__objects_25) $(am__objects_26) $(am__objects_27)
+nodist_libffi_convenience_la_OBJECTS = $(am__objects_29)
 libffi_convenience_la_OBJECTS = $(am_libffi_convenience_la_OBJECTS) \
 	$(nodist_libffi_convenience_la_OBJECTS)
 DEFAULT_INCLUDES = -I.@am__isrc@
@@ -428,8 +431,7 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change
 	src/frv/ffitarget.h src/dlmalloc.c src/moxie/ffi.c		\
 	src/moxie/eabi.S libtool-version ChangeLog.libffi		\
 	m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4	\
-	m4/ltversion.m4 build-ios.sh src/arm/gentramp.sh src/debug.c    \
-	msvcc.sh
+	m4/ltversion.m4 build-ios.sh src/arm/gentramp.sh msvcc.sh
 
 info_TEXINFOS = doc/libffi.texi
 
@@ -475,7 +477,7 @@ MAKEOVERRIDES = 
 ACLOCAL_AMFLAGS = $(ACLOCAL_AMFLAGS) -I m4
 lib_LTLIBRARIES = libffi.la
 noinst_LTLIBRARIES = libffi_convenience.la
-libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c \
+libffi_la_SOURCES = src/prep_cif.c src/types.c \
 		src/raw_api.c src/java_raw_api.c src/closures.c
 
 pkgconfigdir = $(libdir)/pkgconfig
@@ -488,10 +490,11 @@ nodist_libffi_la_SOURCES = $(am__append_
 	$(am__append_15) $(am__append_16) $(am__append_17) \
 	$(am__append_18) $(am__append_19) $(am__append_20) \
 	$(am__append_21) $(am__append_22) $(am__append_23) \
-	$(am__append_24) $(am__append_25) $(am__append_26)
+	$(am__append_24) $(am__append_25) $(am__append_26) \
+	$(am__append_27)
 libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
 nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
-AM_CFLAGS = -g $(am__append_27)
+AM_CFLAGS = -g $(am__append_28)
 libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
 AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
 AM_CCASFLAGS = $(AM_CPPFLAGS)
@@ -599,12 +602,12 @@ src/$(am__dirstamp):
 src/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) src/$(DEPDIR)
 	@: > src/$(DEPDIR)/$(am__dirstamp)
-src/debug.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/prep_cif.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/types.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/raw_api.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/java_raw_api.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/closures.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
+src/debug.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
 src/mips/$(am__dirstamp):
 	@$(MKDIR_P) src/mips
 	@: > src/mips/$(am__dirstamp)
Index: libffi/libtool-version
===================================================================
--- libffi.orig/libtool-version
+++ libffi/libtool-version
@@ -26,4 +26,4 @@
 #    release, then set age to 0.
 #
 # CURRENT:REVISION:AGE
-5:10:0
+6:0:0
