Hi, This patch defines FFI_SIZEOF_JAVA_RAW to 4 for x32, similar to MIPS n32. It fixed:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53982 Thanks. H.J. --- ChangeLog | 5 +++++ src/x86/ffitarget.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ba44189..303aac0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-07-16 H.J. Lu <hongjiu...@intel.com> + + * src/x86//ffitarget.h (FFI_SIZEOF_JAVA_RAW): Defined to 4 for + x32. + 2012-05-05 Nicolas Lelong * libffi.xcodeproj/project.pbxproj: Fixes. diff --git a/src/x86/ffitarget.h b/src/x86/ffitarget.h index f442654..46f294c 100644 --- a/src/x86/ffitarget.h +++ b/src/x86/ffitarget.h @@ -61,8 +61,9 @@ typedef unsigned long long ffi_arg; typedef long long ffi_sarg; #endif #else -#if defined __x86_64__ && !defined __LP64__ +#if defined __x86_64__ && defined __ILP32__ #define FFI_SIZEOF_ARG 8 +#define FFI_SIZEOF_JAVA_RAW 4 typedef unsigned long long ffi_arg; typedef long long ffi_sarg; #else -- 1.7.10.4