diff options
author | tnn <tnn@pkgsrc.org> | 2009-09-20 13:10:30 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2009-09-20 13:10:30 +0000 |
commit | 19060a96cecd9e80a31e907ff11927ba9c1b8686 (patch) | |
tree | fa41ce3acfe03792043ccfc2772cc46cfd7726fe | |
parent | a6902dfda7f0c68344e018b437bc6087a33a58c9 (diff) | |
download | pkgsrc-19060a96cecd9e80a31e907ff11927ba9c1b8686.tar.gz |
Fix build on Tru64.
-rw-r--r-- | devel/libffi/Makefile | 9 | ||||
-rw-r--r-- | devel/libffi/distinfo | 5 | ||||
-rw-r--r-- | devel/libffi/patches/patch-ah | 26 | ||||
-rw-r--r-- | devel/libffi/patches/patch-ai | 29 | ||||
-rw-r--r-- | devel/libffi/patches/patch-aj | 16 |
5 files changed, 83 insertions, 2 deletions
diff --git a/devel/libffi/Makefile b/devel/libffi/Makefile index 907db1acb26..4a61be0b935 100644 --- a/devel/libffi/Makefile +++ b/devel/libffi/Makefile @@ -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 @@ INFO_FILES= yes 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 --git a/devel/libffi/distinfo b/devel/libffi/distinfo index e52b23c62a1..3a17e23e720 100644 --- a/devel/libffi/distinfo +++ b/devel/libffi/distinfo @@ -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-ad) = 8901a00abe25422e3e35f321a5fb89311185fc0b 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 --git a/devel/libffi/patches/patch-ah b/devel/libffi/patches/patch-ah new file mode 100644 index 00000000000..fd636e3ab5c --- /dev/null +++ b/devel/libffi/patches/patch-ah @@ -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 --git a/devel/libffi/patches/patch-ai b/devel/libffi/patches/patch-ai new file mode 100644 index 00000000000..a5a29c12fba --- /dev/null +++ b/devel/libffi/patches/patch-ai @@ -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 --git a/devel/libffi/patches/patch-aj b/devel/libffi/patches/patch-aj new file mode 100644 index 00000000000..c0e41407484 --- /dev/null +++ b/devel/libffi/patches/patch-aj @@ -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 *); |