Fix GNU triplet match for Solaris to indicate that writeable and executable heap is not supported. Fixes complete test failure on x86_64. Update patch offsets and comments while here. Bump PKGREVISION.diff -r1.27 -r1.28 pkgsrc/devel/libffi/Makefile
(jperkin)
@@ -1,16 +1,17 @@ | @@ -1,16 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.27 2015/03/07 16:37:51 tnn Exp $ | 1 | # $NetBSD: Makefile,v 1.28 2016/01/25 17:56:38 jperkin Exp $ | |
2 | 2 | |||
3 | DISTNAME= libffi-3.2.1 | 3 | DISTNAME= libffi-3.2.1 | |
4 | PKGREVISION= 1 | |||
4 | CATEGORIES= devel | 5 | CATEGORIES= devel | |
5 | MASTER_SITES= ftp://sourceware.org/pub/libffi/ | 6 | MASTER_SITES= ftp://sourceware.org/pub/libffi/ | |
6 | 7 | |||
7 | MAINTAINER= asau@inbox.ru | 8 | MAINTAINER= asau@inbox.ru | |
8 | HOMEPAGE= https://www.sourceware.org/libffi/ | 9 | HOMEPAGE= https://www.sourceware.org/libffi/ | |
9 | COMMENT= Foreign function interface | 10 | COMMENT= Foreign function interface | |
10 | LICENSE= mit | 11 | LICENSE= mit | |
11 | 12 | |||
12 | USE_LANGUAGES= c c++ | 13 | USE_LANGUAGES= c c++ | |
13 | USE_LIBTOOL= yes | 14 | USE_LIBTOOL= yes | |
14 | USE_TOOLS+= pkg-config | 15 | USE_TOOLS+= pkg-config | |
15 | GNU_CONFIGURE= yes | 16 | GNU_CONFIGURE= yes | |
16 | CONFIGURE_ARGS= --includedir=${PREFIX}/include | 17 | CONFIGURE_ARGS= --includedir=${PREFIX}/include |
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | $NetBSD: distinfo,v 1.41 2015/11/03 03:27:40 agc Exp $ | 1 | $NetBSD: distinfo,v 1.42 2016/01/25 17:56:38 jperkin Exp $ | |
2 | 2 | |||
3 | SHA1 (libffi-3.2.1.tar.gz) = 280c265b789e041c02e5c97815793dfc283fb1e6 | 3 | SHA1 (libffi-3.2.1.tar.gz) = 280c265b789e041c02e5c97815793dfc283fb1e6 | |
4 | RMD160 (libffi-3.2.1.tar.gz) = 9b546a3d002380bec3f00d86fc47d730abf51dfd | 4 | RMD160 (libffi-3.2.1.tar.gz) = 9b546a3d002380bec3f00d86fc47d730abf51dfd | |
5 | SHA512 (libffi-3.2.1.tar.gz) = 980ca30a8d76f963fca722432b1fe5af77d7a4e4d2eac5144fbc5374d4c596609a293440573f4294207e1bdd9fda80ad1e1cafb2ffb543df5a275bc3bd546483 | 5 | SHA512 (libffi-3.2.1.tar.gz) = 980ca30a8d76f963fca722432b1fe5af77d7a4e4d2eac5144fbc5374d4c596609a293440573f4294207e1bdd9fda80ad1e1cafb2ffb543df5a275bc3bd546483 | |
6 | Size (libffi-3.2.1.tar.gz) = 940837 bytes | 6 | Size (libffi-3.2.1.tar.gz) = 940837 bytes | |
7 | SHA1 (patch-aa) = 7748465dc903b53568999fc8e0caf4ea3fbc5778 | 7 | SHA1 (patch-aa) = 5218c8d895f97c812b7ca8d07c55b82ebcdc87d4 | |
8 | SHA1 (patch-ac) = f3c6324f4334d23e684b4eca25173a13be5d37eb | 8 | SHA1 (patch-ac) = 63fba2e9486b73485a4f633927f5041110c43239 | |
9 | SHA1 (patch-ad) = 8bb3ec9ea69a8c06b0b1963b3f24018c6384c249 | 9 | SHA1 (patch-ad) = db57395ff721d7b56edec8a3a64b4b529258341c | |
10 | SHA1 (patch-ae) = 3d8cd3bcd834876f6e60ae519dca8c0b0ba0d4d1 | 10 | SHA1 (patch-ae) = cf294d57eb0c8aa11033ec9ec26bc7b73c43cba2 | |
11 | SHA1 (patch-af) = 2c7ca79ef980a2561333bf79a18df1ecb0bbb9f7 | 11 | SHA1 (patch-af) = d7dbe79be31cbcc5726269b26271bd0e598e47fd | |
12 | SHA1 (patch-ag) = 6333317170f6e92f89db966315276dcd8e3484f2 | 12 | SHA1 (patch-ag) = ae6a89f6b2be00c52139be6dcd14d0ebfe85d8f7 | |
13 | SHA1 (patch-aj) = d130b2b20b94ca26c70dcc46614e36c6d0ac9153 | 13 | SHA1 (patch-aj) = 5179cfd150bc7de15eb1c5ee0a327016c2c32b3e | |
14 | SHA1 (patch-src_alpha_osf.S) = 3fa2aab1924bc445fa2f76835c3fd38e5a3898f9 | 14 | SHA1 (patch-src_alpha_osf.S) = 50d564a1d88284f04f6896719fa3613e9b0be70b | |
15 | SHA1 (patch-src_arm_sysv.S) = ea294af156566c6e6f63810358de89cba6213c4f | 15 | SHA1 (patch-src_arm_sysv.S) = 2c97e0d069a4df2e1f5b6604e54b2d02c92691e2 | |
16 | SHA1 (patch-src_m88k_elfbsd.S) = fae3e425dcff3e924ef195eab165f9bbc6ec4077 | 16 | SHA1 (patch-src_m88k_elfbsd.S) = 6572c7fa39c00096cb4a80bb88993ff1b4aaa8cc | |
17 | SHA1 (patch-src_x86_win32.S) = 8a41cbc7237d6a171605a66e91d8d92a57181569 | 17 | SHA1 (patch-src_x86_win32.S) = 8a41cbc7237d6a171605a66e91d8d92a57181569 |
@@ -1,14 +1,17 @@ | @@ -1,14 +1,17 @@ | |||
1 | $NetBSD: patch-aa,v 1.23 2014/11/19 13:49:35 wiz Exp $ | 1 | $NetBSD: patch-aa,v 1.24 2016/01/25 17:56:39 jperkin Exp $ | |
2 | ||||
3 | Add more platforms to list which don't support writeable and executable heap. | |||
4 | Other various platform changes. | |||
2 | 5 | |||
3 | --- configure.orig 2014-11-12 11:59:57.000000000 +0000 | 6 | --- configure.orig 2014-11-12 11:59:57.000000000 +0000 | |
4 | +++ configure | 7 | +++ configure | |
5 | @@ -654,6 +654,8 @@ VAX_FALSE | 8 | @@ -654,6 +654,8 @@ VAX_FALSE | |
6 | VAX_TRUE | 9 | VAX_TRUE | |
7 | TILE_FALSE | 10 | TILE_FALSE | |
8 | TILE_TRUE | 11 | TILE_TRUE | |
9 | +VAX_FALSE | 12 | +VAX_FALSE | |
10 | +VAX_TRUE | 13 | +VAX_TRUE | |
11 | PA64_HPUX_FALSE | 14 | PA64_HPUX_FALSE | |
12 | PA64_HPUX_TRUE | 15 | PA64_HPUX_TRUE | |
13 | PA_HPUX_FALSE | 16 | PA_HPUX_FALSE | |
14 | @@ -17120,7 +17122,7 @@ case "$host" in | 17 | @@ -17120,7 +17122,7 @@ case "$host" in | |
@@ -72,27 +75,27 @@ $NetBSD: patch-aa,v 1.23 2014/11/19 13:4 | @@ -72,27 +75,27 @@ $NetBSD: patch-aa,v 1.23 2014/11/19 13:4 | |||
72 | +else | 75 | +else | |
73 | + VAX_TRUE='#' | 76 | + VAX_TRUE='#' | |
74 | + VAX_FALSE= | 77 | + VAX_FALSE= | |
75 | +fi | 78 | +fi | |
76 | + | 79 | + | |
77 | if test x$TARGET = xXTENSA; then | 80 | if test x$TARGET = xXTENSA; then | |
78 | XTENSA_TRUE= | 81 | XTENSA_TRUE= | |
79 | XTENSA_FALSE='#' | 82 | XTENSA_FALSE='#' | |
80 | @@ -18530,7 +18544,7 @@ case "$target" in | 83 | @@ -18530,7 +18544,7 @@ case "$target" in | |
81 | $as_echo "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h | 84 | $as_echo "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h | |
82 | 85 | |||
83 | ;; | 86 | ;; | |
84 | - *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*) | 87 | - *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*) | |
85 | + *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-netbsd* | *-*-openbsd* | *-pc-solaris*) | 88 | + *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-netbsd* | *-*-openbsd* | *-*-solaris*) | |
86 | 89 | |||
87 | $as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h | 90 | $as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h | |
88 | 91 | |||
89 | @@ -18725,11 +18739,6 @@ if test "x$GCC" = "xyes"; then | 92 | @@ -18725,11 +18739,6 @@ if test "x$GCC" = "xyes"; then | |
90 | toolexecdir="${libdir}"/gcc-lib/'$(target_alias)' | 93 | toolexecdir="${libdir}"/gcc-lib/'$(target_alias)' | |
91 | toolexeclibdir="${libdir}" | 94 | toolexeclibdir="${libdir}" | |
92 | fi | 95 | fi | |
93 | - multi_os_directory=`$CC $CFLAGS -print-multi-os-directory` | 96 | - multi_os_directory=`$CC $CFLAGS -print-multi-os-directory` | |
94 | - case $multi_os_directory in | 97 | - case $multi_os_directory in | |
95 | - .) ;; # Avoid trailing /. | 98 | - .) ;; # Avoid trailing /. | |
96 | - ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; | 99 | - ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; | |
97 | - esac | 100 | - esac | |
98 | 101 |
@@ -1,15 +1,15 @@ | @@ -1,15 +1,15 @@ | |||
1 | $NetBSD: patch-ac,v 1.2 2010/01/16 16:28:58 asau Exp $ | 1 | $NetBSD: patch-ac,v 1.3 2016/01/25 17:56:39 jperkin Exp $ | |
2 | 2 | |||
3 | Install header files in backwards compatible way. | 3 | Install header files in backwards compatible way. | |
4 | 4 | |||
5 | --- include/Makefile.in.orig 2009-12-31 15:41:01.000000000 +0300 | 5 | --- include/Makefile.in.orig 2014-11-12 11:59:58.000000000 +0000 | |
6 | +++ include/Makefile.in 2010-01-12 12:43:57.000000000 +0300 | 6 | +++ include/Makefile.in | |
7 | @@ -203,7 +203,7 @@ | 7 | @@ -314,7 +314,7 @@ top_srcdir = @top_srcdir@ | |
8 | AUTOMAKE_OPTIONS = foreign | 8 | AUTOMAKE_OPTIONS = foreign | |
9 | DISTCLEANFILES = ffitarget.h | 9 | DISTCLEANFILES = ffitarget.h | |
10 | EXTRA_DIST = ffi.h.in ffi_common.h | 10 | EXTRA_DIST = ffi.h.in ffi_common.h | |
11 | -includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include | 11 | -includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include | |
12 | +includesdir = $(includedir) | 12 | +includesdir = $(includedir) | |
13 | nodist_includes_HEADERS = ffi.h ffitarget.h | 13 | nodist_includes_HEADERS = ffi.h ffitarget.h | |
14 | all: all-am | 14 | all: all-am | |
15 | 15 |
@@ -1,15 +1,15 @@ | @@ -1,15 +1,15 @@ | |||
1 | $NetBSD: patch-ad,v 1.2 2014/10/28 12:51:03 adam Exp $ | 1 | $NetBSD: patch-ad,v 1.3 2016/01/25 17:56:39 jperkin Exp $ | |
2 | 2 | |||
3 | Install header files in backwards compatible way. | 3 | Install header files in backwards compatible way. | |
4 | 4 | |||
5 | --- libffi.pc.in.orig 2014-04-25 17:45:13.000000000 +0000 | 5 | --- libffi.pc.in.orig 2014-11-08 12:47:24.000000000 +0000 | |
6 | +++ libffi.pc.in | 6 | +++ libffi.pc.in | |
7 | @@ -2,7 +2,7 @@ prefix=@prefix@ | 7 | @@ -2,7 +2,7 @@ prefix=@prefix@ | |
8 | exec_prefix=@exec_prefix@ | 8 | exec_prefix=@exec_prefix@ | |
9 | libdir=@libdir@ | 9 | libdir=@libdir@ | |
10 | toolexeclibdir=@toolexeclibdir@ | 10 | toolexeclibdir=@toolexeclibdir@ | |
11 | -includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include | 11 | -includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include | |
12 | +includedir=@includedir@ | 12 | +includedir=@includedir@ | |
13 | 13 | |||
14 | Name: @PACKAGE_NAME@ | 14 | Name: @PACKAGE_NAME@ | |
15 | Description: Library supporting Foreign Function Interfaces | 15 | Description: Library supporting Foreign Function Interfaces |
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | $NetBSD: patch-ae,v 1.6 2014/02/11 07:21:28 dholland Exp $ | 1 | $NetBSD: patch-ae,v 1.7 2016/01/25 17:56:39 jperkin Exp $ | |
2 | 2 | |||
3 | Make a minimal adjustment to support the various NetBSD mips ports. | 3 | Make a minimal adjustment to support the various NetBSD mips ports. | |
4 | 4 | |||
5 | --- src/mips/ffitarget.h.orig 2012-04-12 02:46:06.000000000 +0000 | 5 | --- src/mips/ffitarget.h.orig 2014-11-08 12:47:24.000000000 +0000 | |
6 | +++ src/mips/ffitarget.h | 6 | +++ src/mips/ffitarget.h | |
7 | @@ -32,7 +32,7 @@ | 7 | @@ -32,7 +32,7 @@ | |
8 | #error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." | 8 | #error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." | |
9 | #endif | 9 | #endif | |
10 | 10 | |||
11 | -#ifdef linux | 11 | -#ifdef linux | |
12 | +#if defined(linux) | 12 | +#if defined(linux) | |
13 | # include <asm/sgidefs.h> | 13 | # include <asm/sgidefs.h> | |
14 | #elif defined(__rtems__) | 14 | #elif defined(__rtems__) | |
15 | /* | 15 | /* | |
16 | @@ -41,8 +41,10 @@ | 16 | @@ -41,8 +41,10 @@ | |
17 | #define _MIPS_SIM_ABI32 1 | 17 | #define _MIPS_SIM_ABI32 1 | |
18 | #define _MIPS_SIM_NABI32 2 | 18 | #define _MIPS_SIM_NABI32 2 |
@@ -1,16 +1,18 @@ | @@ -1,16 +1,18 @@ | |||
1 | $NetBSD: patch-src_arm_sysv.S,v 1.6 2014/11/10 21:29:40 joerg Exp $ | 1 | $NetBSD: patch-src_arm_sysv.S,v 1.7 2016/01/25 17:56:39 jperkin Exp $ | |
2 | 2 | |||
3 | --- src/arm/sysv.S.orig 2014-04-25 17:45:13.000000000 +0000 | 3 | ARM fixes. | |
4 | ||||
5 | --- src/arm/sysv.S.orig 2014-11-08 12:47:24.000000000 +0000 | |||
4 | +++ src/arm/sysv.S | 6 | +++ src/arm/sysv.S | |
5 | @@ -25,6 +25,8 @@ | 7 | @@ -25,6 +25,8 @@ | |
6 | DEALINGS IN THE SOFTWARE. | 8 | DEALINGS IN THE SOFTWARE. | |
7 | ----------------------------------------------------------------------- */ | 9 | ----------------------------------------------------------------------- */ | |
8 | 10 | |||
9 | +.syntax unified | 11 | +.syntax unified | |
10 | + | 12 | + | |
11 | #define LIBFFI_ASM | 13 | #define LIBFFI_ASM | |
12 | #include <fficonfig.h> | 14 | #include <fficonfig.h> | |
13 | #include <ffi.h> | 15 | #include <ffi.h> | |
14 | @@ -103,7 +105,7 @@ | 16 | @@ -103,7 +105,7 @@ | |
15 | #endif | 17 | #endif | |
16 | 18 |
@@ -1,59 +1,59 @@ | @@ -1,59 +1,59 @@ | |||
1 | $NetBSD: patch-af,v 1.3 2012/09/14 23:45:27 asau Exp $ | 1 | $NetBSD: patch-af,v 1.4 2016/01/25 17:56:39 jperkin Exp $ | |
2 | 2 | |||
3 | Fixes to support the various NetBSD mips ports. | 3 | Fixes to support the various NetBSD mips ports. | |
4 | 4 | |||
5 | --- src/mips/ffi.c.orig 2011-08-23 18:28:08.000000000 +0400 | 5 | --- src/mips/ffi.c.orig 2014-11-08 12:47:24.000000000 +0000 | |
6 | +++ src/mips/ffi.c 2012-02-19 20:04:17.000000000 +0400 | 6 | +++ src/mips/ffi.c | |
7 | @@ -33,12 +33,17 @@ | 7 | @@ -33,12 +33,17 @@ | |
8 | 8 | |||
9 | #ifdef __GNUC__ | 9 | #ifdef __GNUC__ | |
10 | # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) | 10 | # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) | |
11 | -# define USE__BUILTIN___CLEAR_CACHE 1 | 11 | -# define USE__BUILTIN___CLEAR_CACHE 1 | |
12 | +# if !defined(__NetBSD__) | 12 | +# if !defined(__NetBSD__) | |
13 | +# define USE__BUILTIN___CLEAR_CACHE 1 | 13 | +# define USE__BUILTIN___CLEAR_CACHE 1 | |
14 | +# endif | 14 | +# endif | |
15 | # endif | 15 | # endif | |
16 | #endif | 16 | #endif | |
17 | 17 | |||
18 | #ifndef USE__BUILTIN___CLEAR_CACHE | 18 | #ifndef USE__BUILTIN___CLEAR_CACHE | |
19 | -# if defined(__OpenBSD__) | 19 | -# if defined(__OpenBSD__) | |
20 | +# if defined(__NetBSD__) | 20 | +# if defined(__NetBSD__) | |
21 | +# include <mips/cachectl.h> | 21 | +# include <mips/cachectl.h> | |
22 | +# define cacheflush _cacheflush | 22 | +# define cacheflush _cacheflush | |
23 | +# elif defined(__OpenBSD__) | 23 | +# elif defined(__OpenBSD__) | |
24 | # include <mips64/sysarch.h> | 24 | # include <mips64/sysarch.h> | |
25 | # else | 25 | # else | |
26 | # include <sys/cachectl.h> | 26 | # include <sys/cachectl.h> | |
27 | @@ -465,6 +470,7 @@ | 27 | @@ -472,6 +477,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif | |
28 | ((cif->arg_types)[index]->type << (arg_reg * FFI_FLAG_BITS)); | 28 | ((cif->arg_types)[index]->type << (arg_reg * FFI_FLAG_BITS)); | |
29 | arg_reg++; | 29 | arg_reg++; | |
30 | break; | 30 | break; | |
31 | +#ifdef __mips64 | 31 | +#ifdef __mips64 | |
32 | case FFI_TYPE_LONGDOUBLE: | 32 | case FFI_TYPE_LONGDOUBLE: | |
33 | /* Align it. */ | 33 | /* Align it. */ | |
34 | arg_reg = ALIGN(arg_reg, 2); | 34 | arg_reg = ALIGN(arg_reg, 2); | |
35 | @@ -483,7 +489,7 @@ | 35 | @@ -490,7 +496,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif | |
36 | arg_reg++; | 36 | arg_reg++; | |
37 | } | 37 | } | |
38 | break; | 38 | break; | |
39 | - | 39 | - | |
40 | +#endif | 40 | +#endif | |
41 | case FFI_TYPE_STRUCT: | 41 | case FFI_TYPE_STRUCT: | |
42 | loc = arg_reg * FFI_SIZEOF_ARG; | 42 | loc = arg_reg * FFI_SIZEOF_ARG; | |
43 | cif->flags += calc_n32_struct_flags(soft_float, | 43 | cif->flags += calc_n32_struct_flags(soft_float, | |
44 | @@ -545,6 +551,7 @@ | 44 | @@ -552,6 +558,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif | |
45 | cif->flags += cif->rtype->type << (FFI_FLAG_BITS * 8); | 45 | cif->flags += cif->rtype->type << (FFI_FLAG_BITS * 8); | |
46 | break; | 46 | break; | |
47 | 47 | |||
48 | +#ifdef __mips64 | 48 | +#ifdef __mips64 | |
49 | case FFI_TYPE_LONGDOUBLE: | 49 | case FFI_TYPE_LONGDOUBLE: | |
50 | /* Long double is returned as if it were a struct containing | 50 | /* Long double is returned as if it were a struct containing | |
51 | two doubles. */ | 51 | two doubles. */ | |
52 | @@ -561,6 +568,7 @@ | 52 | @@ -568,6 +575,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif | |
53 | << (4 + (FFI_FLAG_BITS * 8)); | 53 | << (4 + (FFI_FLAG_BITS * 8)); | |
54 | } | 54 | } | |
55 | break; | 55 | break; | |
56 | +#endif | 56 | +#endif | |
57 | default: | 57 | default: | |
58 | cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 8); | 58 | cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 8); | |
59 | break; | 59 | break; |
@@ -1,15 +1,15 @@ | @@ -1,15 +1,15 @@ | |||
1 | $NetBSD: patch-ag,v 1.1 2009/05/26 12:27:12 he Exp $ | 1 | $NetBSD: patch-ag,v 1.2 2016/01/25 17:56:39 jperkin Exp $ | |
2 | 2 | |||
3 | The %Lf printf format expects "long double", so cast args accordingly. | 3 | The %Lf printf format expects "long double", so cast args accordingly. | |
4 | 4 | |||
5 | --- testsuite/libffi.call/float2.c.orig 2008-01-29 16:15:20.000000000 +0100 | 5 | --- testsuite/libffi.call/float2.c.orig 2014-11-08 12:47:24.000000000 +0000 | |
6 | +++ testsuite/libffi.call/float2.c | 6 | +++ testsuite/libffi.call/float2.c | |
7 | @@ -44,7 +44,7 @@ int main (void) | 7 | @@ -45,7 +45,7 @@ int main (void) | |
8 | /* This is ifdef'd out for now. long double support under SunOS/gcc | 8 | /* This is ifdef'd out for now. long double support under SunOS/gcc | |
9 | is pretty much non-existent. You'll get the odd bus error in library | 9 | is pretty much non-existent. You'll get the odd bus error in library | |
10 | routines like printf(). */ | 10 | routines like printf(). */ | |
11 | - printf ("%Lf, %Lf, %Lf, %Lf\n", ld, ldblit(f), ld - ldblit(f), LDBL_EPSILON); | 11 | - printf ("%Lf, %Lf, %Lf, %Lf\n", ld, ldblit(f), ld - ldblit(f), LDBL_EPSILON); | |
12 | + printf ("%Lf, %Lf, %Lf, %Lf\n", (long double)ld, (long double)ldblit(f), (long double)(ld - ldblit(f)), (long double)LDBL_EPSILON); | 12 | + printf ("%Lf, %Lf, %Lf, %Lf\n", (long double)ld, (long double)ldblit(f), (long double)(ld - ldblit(f)), (long double)LDBL_EPSILON); | |
13 | #endif | 13 | #endif | |
14 | 14 | |||
15 | /* These are not always the same!! Check for a reasonable delta */ | 15 | /* These are not always the same!! Check for a reasonable delta */ |
@@ -1,21 +1,21 @@ | @@ -1,21 +1,21 @@ | |||
1 | $NetBSD: patch-src_alpha_osf.S,v 1.1 2015/01/09 15:10:51 martin Exp $ | 1 | $NetBSD: patch-src_alpha_osf.S,v 1.2 2016/01/25 17:56:39 jperkin Exp $ | |
2 | 2 | |||
3 | Band-aid update of the alpha asm code to make it compile past the addition | 3 | Band-aid update of the alpha asm code to make it compile past the addition | |
4 | of type complex. Someone with clue on the alpha ELF ABI should provide | 4 | of type complex. Someone with clue on the alpha ELF ABI should provide | |
5 | real support for complex arguments. | 5 | real support for complex arguments. | |
6 | 6 | |||
7 | --- src/alpha/osf.S.orig 2014-11-08 13:47:24.000000000 +0100 | 7 | --- src/alpha/osf.S.orig 2014-11-08 12:47:24.000000000 +0000 | |
8 | +++ src/alpha/osf.S 2014-12-26 13:02:32.000000000 +0100 | 8 | +++ src/alpha/osf.S | |
9 | @@ -279,6 +279,7 @@ $load_table: | 9 | @@ -279,6 +279,7 @@ $load_table: | |
10 | .gprel32 $load_64 # FFI_TYPE_SINT64 | 10 | .gprel32 $load_64 # FFI_TYPE_SINT64 | |
11 | .gprel32 $load_none # FFI_TYPE_STRUCT | 11 | .gprel32 $load_none # FFI_TYPE_STRUCT | |
12 | .gprel32 $load_64 # FFI_TYPE_POINTER | 12 | .gprel32 $load_64 # FFI_TYPE_POINTER | |
13 | + .gprel32 $load_none # FFI_TYPE_COMPLEX | 13 | + .gprel32 $load_none # FFI_TYPE_COMPLEX | |
14 | 14 | |||
15 | /* Assert that the table above is in sync with ffi.h. */ | 15 | /* Assert that the table above is in sync with ffi.h. */ | |
16 | 16 | |||
17 | @@ -294,7 +295,8 @@ $load_table: | 17 | @@ -294,7 +295,8 @@ $load_table: | |
18 | || FFI_TYPE_SINT64 != 12 \ | 18 | || FFI_TYPE_SINT64 != 12 \ | |
19 | || FFI_TYPE_STRUCT != 13 \ | 19 | || FFI_TYPE_STRUCT != 13 \ | |
20 | || FFI_TYPE_POINTER != 14 \ | 20 | || FFI_TYPE_POINTER != 14 \ | |
21 | - || FFI_TYPE_LAST != 14 | 21 | - || FFI_TYPE_LAST != 14 |
@@ -1,16 +1,18 @@ | @@ -1,16 +1,18 @@ | |||
1 | $NetBSD: patch-src_m88k_elfbsd.S,v 1.1 2013/11/03 23:51:51 jklos Exp $ | 1 | $NetBSD: patch-src_m88k_elfbsd.S,v 1.2 2016/01/25 17:56:39 jperkin Exp $ | |
2 | 2 | |||
3 | --- src/m88k/elfbsd.S.orig 2013-11-03 22:57:57.000000000 +0000 | 3 | m88k support. | |
4 | ||||
5 | --- src/m88k/elfbsd.S.orig 2016-01-25 17:24:51.000000000 +0000 | |||
4 | +++ src/m88k/elfbsd.S | 6 | +++ src/m88k/elfbsd.S | |
5 | @@ -0,0 +1,195 @@ | 7 | @@ -0,0 +1,195 @@ | |
6 | +/* | 8 | +/* | |
7 | + * Copyright (c) 2013 Miodrag Vallat. <miod@openbsd.org> | 9 | + * Copyright (c) 2013 Miodrag Vallat. <miod@openbsd.org> | |
8 | + * | 10 | + * | |
9 | + * Permission is hereby granted, free of charge, to any person obtaining | 11 | + * Permission is hereby granted, free of charge, to any person obtaining | |
10 | + * a copy of this software and associated documentation files (the | 12 | + * a copy of this software and associated documentation files (the | |
11 | + * ``Software''), to deal in the Software without restriction, including | 13 | + * ``Software''), to deal in the Software without restriction, including | |
12 | + * without limitation the rights to use, copy, modify, merge, publish, | 14 | + * without limitation the rights to use, copy, modify, merge, publish, | |
13 | + * distribute, sublicense, and/or sell copies of the Software, and to | 15 | + * distribute, sublicense, and/or sell copies of the Software, and to | |
14 | + * permit persons to whom the Software is furnished to do so, subject to | 16 | + * permit persons to whom the Software is furnished to do so, subject to | |
15 | + * the following conditions: | 17 | + * the following conditions: | |
16 | + * | 18 | + * |
@@ -1,29 +1,31 @@ | @@ -1,29 +1,31 @@ | |||
1 | $NetBSD: patch-aj,v 1.4 2012/09/14 23:45:27 asau Exp $ | 1 | $NetBSD: patch-aj,v 1.5 2016/01/25 17:56:39 jperkin Exp $ | |
2 | 2 | |||
3 | --- src/m68k/ffi.c.orig 2012-04-12 02:46:06.000000000 +0000 | 3 | NetBSD/m68k support. | |
4 | ||||
5 | --- src/m68k/ffi.c.orig 2014-11-08 12:47:24.000000000 +0000 | |||
4 | +++ src/m68k/ffi.c | 6 | +++ src/m68k/ffi.c | |
5 | @@ -9,8 +9,11 @@ | 7 | @@ -9,8 +9,11 @@ | |
6 | 8 | |||
7 | #include <stdlib.h> | 9 | #include <stdlib.h> | |
8 | #include <unistd.h> | 10 | #include <unistd.h> | |
9 | -#ifdef __rtems__ | 11 | -#ifdef __rtems__ | |
10 | +#if defined(__rtems__) | 12 | +#if defined(__rtems__) | |
11 | void rtems_cache_flush_multiple_data_lines( const void *, size_t ); | 13 | void rtems_cache_flush_multiple_data_lines( const void *, size_t ); | |
12 | +#elif defined(__NetBSD__) | 14 | +#elif defined(__NetBSD__) | |
13 | +#include <sys/types.h> | 15 | +#include <sys/types.h> | |
14 | +#include <m68k/sync_icache.h> | 16 | +#include <m68k/sync_icache.h> | |
15 | #else | 17 | #else | |
16 | #include <sys/syscall.h> | 18 | #include <sys/syscall.h> | |
17 | #ifdef __MINT__ | 19 | #ifdef __MINT__ | |
18 | @@ -335,8 +338,10 @@ ffi_prep_closure_loc (ffi_closure* closu | 20 | @@ -345,8 +348,10 @@ ffi_prep_closure_loc (ffi_closure* closu | |
19 | else | 21 | else | |
20 | *(void **)(closure->tramp + 8) = ffi_closure_SYSV; | 22 | *(void **)(closure->tramp + 8) = ffi_closure_SYSV; | |
21 | 23 | |||
22 | -#ifdef __rtems__ | 24 | -#ifdef __rtems__ | |
23 | +#if defined(__rtems__) | 25 | +#if defined(__rtems__) | |
24 | rtems_cache_flush_multiple_data_lines( codeloc, FFI_TRAMPOLINE_SIZE ); | 26 | rtems_cache_flush_multiple_data_lines( codeloc, FFI_TRAMPOLINE_SIZE ); | |
25 | +#elif defined(__NetBSD__) | 27 | +#elif defined(__NetBSD__) | |
26 | + m68k_sync_icache(codeloc, FFI_TRAMPOLINE_SIZE); | 28 | + m68k_sync_icache(codeloc, FFI_TRAMPOLINE_SIZE); | |
27 | #elif defined(__MINT__) | 29 | #elif defined(__MINT__) | |
28 | Ssystem(S_FLUSHCACHE, codeloc, FFI_TRAMPOLINE_SIZE); | 30 | Ssystem(S_FLUSHCACHE, codeloc, FFI_TRAMPOLINE_SIZE); | |
29 | #else | 31 | #else |