Fix build on Tru64.
This commit is contained in:
parent
a6902dfda7
commit
19060a96ce
5 changed files with 83 additions and 2 deletions
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
26
devel/libffi/patches/patch-ah
Normal file
26
devel/libffi/patches/patch-ah
Normal file
|
@ -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;
|
||||
}
|
29
devel/libffi/patches/patch-ai
Normal file
29
devel/libffi/patches/patch-ai
Normal file
|
@ -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;
|
||||
|
16
devel/libffi/patches/patch-aj
Normal file
16
devel/libffi/patches/patch-aj
Normal file
|
@ -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 *);
|
Loading…
Reference in a new issue