Fix build on Tru64.diff -r1.11 -r1.12 pkgsrc/devel/libffi/Makefile
(tnn)
@@ -1,33 +1,40 @@ | @@ -1,33 +1,40 @@ | |||
1 | # $NetBSD: Makefile,v 1.11 2009/05/26 12:27:12 he Exp $ | 1 | # $NetBSD: Makefile,v 1.12 2009/09/20 13:10:30 tnn Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | DISTNAME= libffi-3.0.8 | 4 | DISTNAME= libffi-3.0.8 | |
5 | PKGREVISION= 2 | 5 | PKGREVISION= 2 | |
6 | CATEGORIES= devel | 6 | CATEGORIES= devel | |
7 | MASTER_SITES= ftp://sourceware.org/pub/libffi/ | 7 | MASTER_SITES= ftp://sourceware.org/pub/libffi/ | |
8 | 8 | |||
9 | MAINTAINER= asau@inbox.ru | 9 | MAINTAINER= asau@inbox.ru | |
10 | HOMEPAGE= http://sources.redhat.com/libffi/ | 10 | HOMEPAGE= http://sources.redhat.com/libffi/ | |
11 | COMMENT= Foreign function interface | 11 | COMMENT= Foreign function interface | |
12 | LICENSE= mit | 12 | LICENSE= mit | |
13 | 13 | |||
14 | PKG_DESTDIR_SUPPORT= user-destdir | 14 | PKG_DESTDIR_SUPPORT= user-destdir | |
15 | 15 | |||
16 | GNU_CONFIGURE= yes | 16 | GNU_CONFIGURE= yes | |
17 | CONFIGURE_ARGS= --includedir=${PREFIX}/include | 17 | CONFIGURE_ARGS= --includedir=${PREFIX}/include | |
18 | USE_LIBTOOL= yes | 18 | USE_LIBTOOL= yes | |
19 | USE_TOOLS+= pkg-config | 19 | USE_TOOLS+= pkg-config | |
20 | USE_LANGUAGES= c c++ | 20 | USE_LANGUAGES= c c++ | |
21 | INFO_FILES= yes | 21 | INFO_FILES= yes | |
22 | 22 | |||
23 | PKGCONFIG_OVERRIDE+= libffi.pc.in | 23 | PKGCONFIG_OVERRIDE+= libffi.pc.in | |
24 | 24 | |||
25 | .include "../../mk/compiler.mk" | |||
26 | # The Compaq C frontend groks .s, but not .S. Assemble osf.S directly w/ as(1). | |||
27 | pre-build: | |||
28 | .if !empty(PKGSRC_COMPILER:Mccc) | |||
29 | cd ${WRKSRC} && ./libtool --mode=compile --tag=CC as -I. -Iinclude -o src/alpha/osf.o -c src/alpha/osf.S | |||
30 | .endif | |||
31 | ||||
25 | # Since we don't have "TEST_DEPENDS", we implement it as a hack: | 32 | # Since we don't have "TEST_DEPENDS", we implement it as a hack: | |
26 | .include "../../mk/bsd.prefs.mk" | 33 | .include "../../mk/bsd.prefs.mk" | |
27 | 34 | |||
28 | .if !empty(PKGSRC_RUN_TEST:M[Yy][Ee][Ss]) | 35 | .if !empty(PKGSRC_RUN_TEST:M[Yy][Ee][Ss]) | |
29 | TEST_TARGET= check | 36 | TEST_TARGET= check | |
30 | BUILD_DEPENDS+= dejagnu-[0-9]*:../../devel/dejagnu | 37 | BUILD_DEPENDS+= dejagnu-[0-9]*:../../devel/dejagnu | |
31 | .endif | 38 | .endif | |
32 | 39 | |||
33 | .include "../../mk/bsd.pkg.mk" | 40 | .include "../../mk/bsd.pkg.mk" |
@@ -1,11 +1,14 @@ | @@ -1,11 +1,14 @@ | |||
1 | $NetBSD: distinfo,v 1.12 2009/05/26 12:27:12 he Exp $ | 1 | $NetBSD: distinfo,v 1.13 2009/09/20 13:10:30 tnn Exp $ | |
2 | 2 | |||
3 | SHA1 (libffi-3.0.8.tar.gz) = ce44d10c39d9a37479c8777e206cac0f36c48712 | 3 | SHA1 (libffi-3.0.8.tar.gz) = ce44d10c39d9a37479c8777e206cac0f36c48712 | |
4 | RMD160 (libffi-3.0.8.tar.gz) = 4144f64e79ebf95161a6afd58ceaeef8372b5e57 | 4 | RMD160 (libffi-3.0.8.tar.gz) = 4144f64e79ebf95161a6afd58ceaeef8372b5e57 | |
5 | Size (libffi-3.0.8.tar.gz) = 722834 bytes | 5 | Size (libffi-3.0.8.tar.gz) = 722834 bytes | |
6 | SHA1 (patch-aa) = 6020adaf5c9ab0f6de94f930214fa1d726fe8717 | 6 | SHA1 (patch-aa) = 6020adaf5c9ab0f6de94f930214fa1d726fe8717 | |
7 | SHA1 (patch-ac) = 307c08e8e3df5f079c0b2f63da58bb59fc089d30 | 7 | SHA1 (patch-ac) = 307c08e8e3df5f079c0b2f63da58bb59fc089d30 | |
8 | SHA1 (patch-ad) = 8901a00abe25422e3e35f321a5fb89311185fc0b | 8 | SHA1 (patch-ad) = 8901a00abe25422e3e35f321a5fb89311185fc0b | |
9 | SHA1 (patch-ae) = d3cbb4e3e00e0b7ced9cd50198da0772f6c73111 | 9 | SHA1 (patch-ae) = d3cbb4e3e00e0b7ced9cd50198da0772f6c73111 | |
10 | SHA1 (patch-af) = daa640516b837ffeb925b2b3b97a5d75d5156165 | 10 | SHA1 (patch-af) = daa640516b837ffeb925b2b3b97a5d75d5156165 | |
11 | SHA1 (patch-ag) = 6333317170f6e92f89db966315276dcd8e3484f2 | 11 | SHA1 (patch-ag) = 6333317170f6e92f89db966315276dcd8e3484f2 | |
12 | SHA1 (patch-ah) = e9580069ede90cd616da7bc230b28acbf5d204a6 | |||
13 | SHA1 (patch-ai) = f9a81054764fd15bcd2e4743c90e425e844b0825 | |||
14 | SHA1 (patch-aj) = 6fa0cff1b0e764fe0311d87365b85d2318814a2d |
$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;
}
$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;
$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 *);