pkgsrc/devel/libffi/patches/patch-af
asau e952622554 Update to libffi 3.0.11
3.0.11 Apr-11-12
        Add support for variadic functions (ffi_prep_cif_var).
	Add Linux/x32 support.
	Add thiscall, fastcall and MSVC cdecl support on Windows.
        Add Amiga and newer MacOS support.
	Add m68k FreeMiNT support.
	Integration with iOS' xcode build tools.
	Fix Octeon and MC68881 support.
	Fix code pessimizations.
        Lots of build fixes.

3.0.10 Aug-23-11
        Add support for Apple's iOS.
	Add support for ARM VFP ABI.
        Add RTEMS support for MIPS and M68K.
	Fix instruction cache clearing problems on
	  ARM and SPARC.
	Fix the N64 build on mips-sgi-irix6.5.
	Enable builds with Microsoft's compiler.
	Enable x86 builds with Oracle's Solaris compiler.
	Fix support for calling code compiled with Oracle's Sparc
	  Solaris compiler.
	Testsuite fixes for Tru64 Unix.
	Additional platform support.
2012-09-14 23:45:27 +00:00

59 lines
1.5 KiB
Text

$NetBSD: patch-af,v 1.3 2012/09/14 23:45:27 asau Exp $
Fixes to support the various NetBSD mips ports.
--- src/mips/ffi.c.orig 2011-08-23 18:28:08.000000000 +0400
+++ src/mips/ffi.c 2012-02-19 20:04:17.000000000 +0400
@@ -33,12 +33,17 @@
#ifdef __GNUC__
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))
-# define USE__BUILTIN___CLEAR_CACHE 1
+# if !defined(__NetBSD__)
+# define USE__BUILTIN___CLEAR_CACHE 1
+# endif
# endif
#endif
#ifndef USE__BUILTIN___CLEAR_CACHE
-# if defined(__OpenBSD__)
+# if defined(__NetBSD__)
+# include <mips/cachectl.h>
+# define cacheflush _cacheflush
+# elif defined(__OpenBSD__)
# include <mips64/sysarch.h>
# else
# include <sys/cachectl.h>
@@ -465,6 +470,7 @@
((cif->arg_types)[index]->type << (arg_reg * FFI_FLAG_BITS));
arg_reg++;
break;
+#ifdef __mips64
case FFI_TYPE_LONGDOUBLE:
/* Align it. */
arg_reg = ALIGN(arg_reg, 2);
@@ -483,7 +489,7 @@
arg_reg++;
}
break;
-
+#endif
case FFI_TYPE_STRUCT:
loc = arg_reg * FFI_SIZEOF_ARG;
cif->flags += calc_n32_struct_flags(soft_float,
@@ -545,6 +551,7 @@
cif->flags += cif->rtype->type << (FFI_FLAG_BITS * 8);
break;
+#ifdef __mips64
case FFI_TYPE_LONGDOUBLE:
/* Long double is returned as if it were a struct containing
two doubles. */
@@ -561,6 +568,7 @@
<< (4 + (FFI_FLAG_BITS * 8));
}
break;
+#endif
default:
cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 8);
break;