summaryrefslogtreecommitdiff
path: root/devel/libffi
diff options
context:
space:
mode:
authorjmcneill <jmcneill@pkgsrc.org>2010-03-30 09:21:30 +0000
committerjmcneill <jmcneill@pkgsrc.org>2010-03-30 09:21:30 +0000
commitd1054cb49c6a8401410f19dec81b870725bf08d6 (patch)
tree05a3003d494e5859ad4c3126161bcc9c27bb9406 /devel/libffi
parent70b5bf9605b26a1322d6f4336083942b78307306 (diff)
downloadpkgsrc-d1054cb49c6a8401410f19dec81b870725bf08d6.tar.gz
pkg/42858: devel/libffi-3.0.9 fails to build on NetBSD/cobalt 5.02
Fix build for NetBSD/mips, tested on NetBSD/sgimips 5.0_STABLE
Diffstat (limited to 'devel/libffi')
-rw-r--r--devel/libffi/patches/patch-ae47
-rw-r--r--devel/libffi/patches/patch-af39
2 files changed, 73 insertions, 13 deletions
diff --git a/devel/libffi/patches/patch-ae b/devel/libffi/patches/patch-ae
index 1bb57475b62..0c680de2920 100644
--- a/devel/libffi/patches/patch-ae
+++ b/devel/libffi/patches/patch-ae
@@ -1,18 +1,45 @@
-$NetBSD: patch-ae,v 1.2 2010/01/16 16:28:58 asau Exp $
+$NetBSD: patch-ae,v 1.3 2010/03/30 09:21:30 jmcneill Exp $
Make a minimal adjustment to support the various NetBSD mips ports.
---- src/mips/ffitarget.h.orig 2009-12-29 18:22:26.000000000 +0300
-+++ src/mips/ffitarget.h 2010-01-12 12:45:23.000000000 +0300
-@@ -41,6 +41,11 @@
- # ifndef _ABIO32
- # define _ABIO32 _MIPS_SIM_ABI32
- # endif
-+#ifdef __NetBSD__
+--- src/mips/ffitarget.h.orig 2009-12-29 10:22:26.000000000 -0500
++++ src/mips/ffitarget.h 2010-03-30 05:08:48.000000000 -0400
+@@ -27,20 +27,27 @@
+ #ifndef LIBFFI_TARGET_H
+ #define LIBFFI_TARGET_H
+
+-#ifdef linux
++#if defined(linux)
+ # include <asm/sgidefs.h>
+-#else
++#elif defined(irix)
+ # include <sgidefs.h>
++#else
++# include <sys/cdefs.h>
++#endif
++#ifndef _ABIN32
++# define _ABIN32 _MIPS_SIM_NABI32
++#endif
++#ifndef _ABI64
++# define _ABI64 _MIPS_SIM_ABI64
++#endif
++#ifndef _ABIO32
++# define _ABIO32 _MIPS_SIM_ABI32
++#endif
++
++#ifndef _MIPS_SIM
+/* Let's cheat a bit... */
-+# define _ABIO32 1
+# define _MIPS_SIM _ABIO32
-+#endif
+ #endif
+-# ifndef _ABIN32
+-# define _ABIN32 _MIPS_SIM_NABI32
+-# endif
+-# ifndef _ABI64
+-# define _ABI64 _MIPS_SIM_ABI64
+-# endif
+-# ifndef _ABIO32
+-# define _ABIO32 _MIPS_SIM_ABI32
+-# endif
#if !defined(_MIPS_SIM)
-- something is very wrong --
diff --git a/devel/libffi/patches/patch-af b/devel/libffi/patches/patch-af
index a677d1047ed..9be73742529 100644
--- a/devel/libffi/patches/patch-af
+++ b/devel/libffi/patches/patch-af
@@ -1,9 +1,9 @@
-$NetBSD: patch-af,v 1.1 2009/05/26 12:27:12 he Exp $
+$NetBSD: patch-af,v 1.2 2010/03/30 09:21:30 jmcneill Exp $
Fixes to support the various NetBSD mips ports.
---- src/mips/ffi.c.orig 2008-02-26 18:34:36.000000000 +0100
-+++ src/mips/ffi.c
+--- src/mips/ffi.c.orig 2009-12-29 10:22:26.000000000 -0500
++++ src/mips/ffi.c 2010-03-30 04:57:29.000000000 -0400
@@ -32,12 +32,19 @@
#ifdef __GNUC__
@@ -26,3 +26,36 @@ Fixes to support the various NetBSD mips ports.
#endif
#ifdef FFI_DEBUG
+@@ -460,6 +467,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif
+ ((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);
+@@ -478,7 +486,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif
+ arg_reg++;
+ }
+ break;
+-
++#endif
+ case FFI_TYPE_STRUCT:
+ loc = arg_reg * FFI_SIZEOF_ARG;
+ cif->flags += calc_n32_struct_flags(soft_float,
+@@ -540,6 +548,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif
+ 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. */
+@@ -556,6 +565,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif
+ << (4 + (FFI_FLAG_BITS * 8));
+ }
+ break;
++#endif
+ default:
+ cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 8);
+ break;