pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/libffi Fix build on Tru64.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0c03fcec68f2
branches:  trunk
changeset: 399490:0c03fcec68f2
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sun Sep 20 13:10:30 2009 +0000

description:
Fix build on Tru64.

diffstat:

 devel/libffi/Makefile         |   9 ++++++++-
 devel/libffi/distinfo         |   5 ++++-
 devel/libffi/patches/patch-ah |  26 ++++++++++++++++++++++++++
 devel/libffi/patches/patch-ai |  29 +++++++++++++++++++++++++++++
 devel/libffi/patches/patch-aj |  16 ++++++++++++++++
 5 files changed, 83 insertions(+), 2 deletions(-)

diffs (122 lines):

diff -r 13598224581c -r 0c03fcec68f2 devel/libffi/Makefile
--- a/devel/libffi/Makefile     Sun Sep 20 13:05:33 2009 +0000
+++ b/devel/libffi/Makefile     Sun Sep 20 13:10:30 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.11 2009/05/26 12:27:12 he Exp $
+# $NetBSD: Makefile,v 1.12 2009/09/20 13:10:30 tnn Exp $
 #
 
 DISTNAME=      libffi-3.0.8
@@ -22,6 +22,13 @@
 
 PKGCONFIG_OVERRIDE+=   libffi.pc.in
 
+.include "../../mk/compiler.mk"
+# The Compaq C frontend groks .s, but not .S. Assemble osf.S directly w/ as(1).
+pre-build:
+.if !empty(PKGSRC_COMPILER:Mccc)
+       cd ${WRKSRC} && ./libtool --mode=compile --tag=CC as -I. -Iinclude -o src/alpha/osf.o -c src/alpha/osf.S
+.endif
+
 # Since we don't have "TEST_DEPENDS", we implement it as a hack:
 .include "../../mk/bsd.prefs.mk"
 
diff -r 13598224581c -r 0c03fcec68f2 devel/libffi/distinfo
--- a/devel/libffi/distinfo     Sun Sep 20 13:05:33 2009 +0000
+++ b/devel/libffi/distinfo     Sun Sep 20 13:10:30 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2009/05/26 12:27:12 he Exp $
+$NetBSD: distinfo,v 1.13 2009/09/20 13:10:30 tnn Exp $
 
 SHA1 (libffi-3.0.8.tar.gz) = ce44d10c39d9a37479c8777e206cac0f36c48712
 RMD160 (libffi-3.0.8.tar.gz) = 4144f64e79ebf95161a6afd58ceaeef8372b5e57
@@ -9,3 +9,6 @@
 SHA1 (patch-ae) = d3cbb4e3e00e0b7ced9cd50198da0772f6c73111
 SHA1 (patch-af) = daa640516b837ffeb925b2b3b97a5d75d5156165
 SHA1 (patch-ag) = 6333317170f6e92f89db966315276dcd8e3484f2
+SHA1 (patch-ah) = e9580069ede90cd616da7bc230b28acbf5d204a6
+SHA1 (patch-ai) = f9a81054764fd15bcd2e4743c90e425e844b0825
+SHA1 (patch-aj) = 6fa0cff1b0e764fe0311d87365b85d2318814a2d
diff -r 13598224581c -r 0c03fcec68f2 devel/libffi/patches/patch-ah
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libffi/patches/patch-ah     Sun Sep 20 13:10:30 2009 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-ah,v 1.1 2009/09/20 13:10:30 tnn Exp $
+
+--- src/alpha/ffi.c.orig       2008-02-26 18:34:36.000000000 +0100
++++ src/alpha/ffi.c
+@@ -27,6 +27,9 @@
+ #include <ffi.h>
+ #include <ffi_common.h>
+ #include <stdlib.h>
++#ifndef __GNUC__
++#include <c_asm.h>
++#endif
+ 
+ /* Force FFI_TYPE_LONGDOUBLE to be different than FFI_TYPE_DOUBLE;
+    all further uses in this file will refer to the 128-bit type.  */
+@@ -195,7 +198,11 @@ ffi_prep_closure_loc (ffi_closure* closu
+      instead, since both Compaq as and gas can handle it.
+ 
+      0x86 is PAL_imb in Tru64 UNIX <alpha/pal.h>.  */
++#ifdef __GNUC__
+   asm volatile ("call_pal 0x86" : : : "memory");
++#else /* Compaq C compiler */
++  asm ("call_pal 0x86");
++#endif
+ 
+   return FFI_OK;
+ }
diff -r 13598224581c -r 0c03fcec68f2 devel/libffi/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libffi/patches/patch-ai     Sun Sep 20 13:10:30 2009 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-ai,v 1.1 2009/09/20 13:10:30 tnn Exp $
+
+--- include/ffi_common.h.orig  2008-07-12 07:43:00.000000000 +0200
++++ include/ffi_common.h
+@@ -77,6 +77,16 @@ typedef struct
+ } extended_cif;
+ 
+ /* Terse sized type definitions.  */
++#if defined(__digital__) && !defined(__GNUC__) /* XXX tnn: check sunpro */
++typedef unsigned int UINT8;
++typedef signed int   SINT8;
++typedef unsigned int UINT16;
++typedef signed int   SINT16;
++typedef unsigned int UINT32;
++typedef signed int   SINT32;
++typedef unsigned int UINT64;
++typedef signed int   SINT64;
++#else
+ typedef unsigned int UINT8  __attribute__((__mode__(__QI__)));
+ typedef signed int   SINT8  __attribute__((__mode__(__QI__)));
+ typedef unsigned int UINT16 __attribute__((__mode__(__HI__)));
+@@ -85,6 +95,7 @@ typedef unsigned int UINT32 __attribute_
+ typedef signed int   SINT32 __attribute__((__mode__(__SI__)));
+ typedef unsigned int UINT64 __attribute__((__mode__(__DI__)));
+ typedef signed int   SINT64 __attribute__((__mode__(__DI__)));
++#endif
+ 
+ typedef float FLOAT32;
+ 
diff -r 13598224581c -r 0c03fcec68f2 devel/libffi/patches/patch-aj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libffi/patches/patch-aj     Sun Sep 20 13:10:30 2009 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-aj,v 1.1 2009/09/20 13:10:30 tnn Exp $
+
+--- include/ffi.h.in.orig      2008-04-03 20:57:34.000000000 +0200
++++ include/ffi.h.in
+@@ -254,7 +254,11 @@ typedef struct {
+   ffi_cif   *cif;
+   void     (*fun)(ffi_cif*,void*,void**,void*);
+   void      *user_data;
++#if defined(__digital__) && !defined(__GNUC__)
++} ffi_closure;
++#else
+ } ffi_closure __attribute__((aligned (8)));
++#endif
+ 
+ void *ffi_closure_alloc (size_t size, void **code);
+ void ffi_closure_free (void *);



Home | Main Index | Thread Index | Old Index