Hi,

updated patch (from a commit to GCC’s libffi) attached.

bye,
//mirabilos
-- 
  “Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool.”
                                                -- Edward Burr
diff -Nru libffi-3.0.11~rc1/debian/changelog libffi-3.0.11~rc1/debian/changelog
--- libffi-3.0.11~rc1/debian/changelog  2011-10-12 19:46:01.000000000 +0000
+++ libffi-3.0.11~rc1/debian/changelog  2012-03-04 15:40:31.000000000 +0000
@@ -1,3 +1,9 @@
+libffi (3.0.11~rc1-5+m68k.2) local; urgency=low
+
+  * Fix m68k floats (Andreas Schwab) and err_bad_abi (Alan Hourihane).
+
+ -- Thorsten Glaser <[email protected]>  Sun, 04 Mar 2012 15:40:20 +0000
+
 libffi (3.0.11~rc1-5) experimental; urgency=low
 
   * Fix powerpc and ppc64 builds (Kyle Moffett).
diff -Nru libffi-3.0.11~rc1/debian/patches/m68k-fix.diff 
libffi-3.0.11~rc1/debian/patches/m68k-fix.diff
--- libffi-3.0.11~rc1/debian/patches/m68k-fix.diff      1970-01-01 
00:00:00.000000000 +0000
+++ libffi-3.0.11~rc1/debian/patches/m68k-fix.diff      2012-03-04 
15:40:16.000000000 +0000
@@ -0,0 +1,81 @@
+Index: libffi-3.0.11~rc1/src/m68k/ffi.c
+===================================================================
+--- libffi-3.0.11~rc1.orig/src/m68k/ffi.c      2011-07-28 19:45:45.000000000 
+0000
++++ libffi-3.0.11~rc1/src/m68k/ffi.c   2012-03-04 15:39:01.000000000 +0000
+@@ -261,7 +261,8 @@
+                     void *user_data,
+                     void *codeloc)
+ {
+-  FFI_ASSERT (cif->abi == FFI_SYSV);
++  if (cif->abi != FFI_SYSV)
++    return FFI_BAD_ABI;
+ 
+   *(unsigned short *)closure->tramp = 0x207c;
+   *(void **)(closure->tramp + 2) = codeloc;
+Index: libffi-3.0.11~rc1/src/m68k/sysv.S
+===================================================================
+--- libffi-3.0.11~rc1.orig/src/m68k/sysv.S     2011-07-28 19:45:45.000000000 
+0000
++++ libffi-3.0.11~rc1/src/m68k/sysv.S  2012-03-04 15:39:55.000000000 +0000
+@@ -87,7 +87,7 @@
+ 
+       | If the return value pointer is NULL, assume no return value.
+       | NOTE: On the mc68000, tst on an address register is not supported.
+-#if defined(__mc68000__) && !defined(__mcoldfire__)
++#if !defined(__mc68020__) && !defined(__mc68030__) && !defined(__mc68040__) 
&& !defined(__mc68060__) && !defined(__mcoldfire__)
+       cmp.w   #0, %a1
+ #else
+       tst.l   %a1
+@@ -109,7 +109,7 @@
+ retfloat:
+       btst    #2,%d2
+       jbeq    retdouble
+-#if defined(__MC68881__)
++#if defined(__MC68881__) || defined(__HAVE_68881__)
+       fmove.s %fp0,(%a1)
+ #else
+       move.l  %d0,(%a1)
+@@ -119,7 +119,7 @@
+ retdouble:
+       btst    #3,%d2
+       jbeq    retlongdouble
+-#if defined(__MC68881__)
++#if defined(__MC68881__) || defined(__HAVE_68881__)
+       fmove.d %fp0,(%a1)
+ #else
+       move.l  %d0,(%a1)+
+@@ -130,7 +130,7 @@
+ retlongdouble:
+       btst    #4,%d2
+       jbeq    retpointer
+-#if defined(__MC68881__)
++#if defined(__MC68881__) || defined(__HAVE_68881__)
+       fmove.x %fp0,(%a1)
+ #else
+       move.l  %d0,(%a1)+
+@@ -199,7 +199,7 @@
+       move.l  (%a0),%d1
+       jra     .Lcls_epilogue
+ .Lcls_ret_float:
+-#if defined(__MC68881__)
++#if defined(__MC68881__) || defined(__HAVE_68881__)
+       fmove.s (%a0),%fp0
+ #else
+       move.l  (%a0),%d0
+@@ -209,7 +209,7 @@
+       lsr.l   #2,%d0
+       jne     1f
+       jcs     .Lcls_ret_ldouble
+-#if defined(__MC68881__)
++#if defined(__MC68881__) || defined(__HAVE_68881__)
+       fmove.d (%a0),%fp0
+ #else
+       move.l  (%a0)+,%d0
+@@ -217,7 +217,7 @@
+ #endif
+       jra     .Lcls_epilogue
+ .Lcls_ret_ldouble:
+-#if defined(__MC68881__)
++#if defined(__MC68881__) || defined(__HAVE_68881__)
+       fmove.x (%a0),%fp0
+ #else
+       move.l  (%a0)+,%d0
diff -Nru libffi-3.0.11~rc1/debian/patches/series 
libffi-3.0.11~rc1/debian/patches/series
--- libffi-3.0.11~rc1/debian/patches/series     2011-10-07 10:06:54.000000000 
+0000
+++ libffi-3.0.11~rc1/debian/patches/series     2012-03-04 15:38:40.000000000 
+0000
@@ -3,3 +3,4 @@
 sparc-v8-fix.diff
 kfreebsd-config.diff
 powerpc-softfloat.diff
+m68k-fix.diff

Reply via email to