Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 1 | diff -r -N -u libffi.orig/autom4te.cache/output.0 libffi/autom4te.cache/output.0 |
| 2 | diff -r -N -u libffi.orig/configure libffi/configure |
| 3 | --- libffi.orig/configure 2013-03-17 15:37:50.000000000 -0700 |
| 4 | +++ libffi/configure 2013-03-18 15:11:39.611575163 -0700 |
| 5 | @@ -13368,6 +13368,10 @@ |
| 6 | fi |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 7 | ;; |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 8 | |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 9 | + i*86-*-nto-qnx*) |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 10 | + TARGET=X86; TARGETDIR=x86 |
| 11 | + ;; |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 12 | + |
| 13 | x86_64-*-darwin*) |
| 14 | TARGET=X86_DARWIN; TARGETDIR=x86 |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 15 | ;; |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 16 | @@ -13426,12 +13430,12 @@ |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 17 | ;; |
| 18 | |
doko@ubuntu.com | 2a91876 | 2012-06-26 17:56:44 +0200 | [diff] [blame] | 19 | mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*) |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 20 | - TARGET=MIPS; TARGETDIR=mips |
| 21 | + TARGET=MIPS_IRIX; TARGETDIR=mips |
| 22 | ;; |
doko@ubuntu.com | 2a91876 | 2012-06-26 17:56:44 +0200 | [diff] [blame] | 23 | mips*-*-linux* | mips*-*-openbsd*) |
Matthias Klose | a834975 | 2010-03-15 13:25:28 +0000 | [diff] [blame] | 24 | # Support 128-bit long double for NewABI. |
| 25 | HAVE_LONG_DOUBLE='defined(__mips64)' |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 26 | - TARGET=MIPS; TARGETDIR=mips |
Matthias Klose | a834975 | 2010-03-15 13:25:28 +0000 | [diff] [blame] | 27 | + TARGET=MIPS_IRIX; TARGETDIR=mips |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 28 | ;; |
| 29 | |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 30 | powerpc*-*-linux* | powerpc-*-sysv*) |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 31 | @@ -13491,7 +13495,7 @@ |
| 32 | as_fn_error $? "\"libffi has not been ported to $host.\"" "$LINENO" 5 |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 33 | fi |
| 34 | |
| 35 | - if test x$TARGET = xMIPS; then |
| 36 | + if expr x$TARGET : 'xMIPS' > /dev/null; then |
| 37 | MIPS_TRUE= |
| 38 | MIPS_FALSE='#' |
| 39 | else |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 40 | @@ -14862,6 +14866,12 @@ |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 41 | ac_config_files="$ac_config_files include/Makefile include/ffi.h Makefile testsuite/Makefile man/Makefile libffi.pc" |
| 42 | |
| 43 | |
| 44 | +ac_config_links="$ac_config_links include/ffi_common.h:include/ffi_common.h" |
| 45 | + |
| 46 | + |
| 47 | +ac_config_files="$ac_config_files fficonfig.py" |
| 48 | + |
| 49 | + |
| 50 | cat >confcache <<\_ACEOF |
| 51 | # This file is a shell script that caches the results of configure |
| 52 | # tests run on this system so they can be shared between configure |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 53 | @@ -16047,6 +16057,8 @@ |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 54 | "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; |
| 55 | "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; |
| 56 | "libffi.pc") CONFIG_FILES="$CONFIG_FILES libffi.pc" ;; |
| 57 | + "include/ffi_common.h") CONFIG_LINKS="$CONFIG_LINKS include/ffi_common.h:include/ffi_common.h" ;; |
| 58 | + "fficonfig.py") CONFIG_FILES="$CONFIG_FILES fficonfig.py" ;; |
| 59 | |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 60 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 61 | esac |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 62 | diff -r -N -u libffi.orig/configure.ac libffi/configure.ac |
| 63 | --- libffi.orig/configure.ac 2013-03-17 15:37:50.000000000 -0700 |
| 64 | +++ libffi/configure.ac 2013-03-18 15:11:11.392989136 -0700 |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 65 | @@ -1,4 +1,7 @@ |
| 66 | dnl Process this with autoconf to create configure |
| 67 | +# |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 68 | +# file from libffi - slightly patched for Python's ctypes |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 69 | +# |
| 70 | |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 71 | AC_PREREQ(2.68) |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 72 | |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 73 | @@ -146,6 +149,10 @@ |
| 74 | fi |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 75 | ;; |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 76 | |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 77 | + i*86-*-nto-qnx*) |
| 78 | + TARGET=X86; TARGETDIR=x86 |
| 79 | + ;; |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 80 | + |
| 81 | x86_64-*-darwin*) |
| 82 | TARGET=X86_DARWIN; TARGETDIR=x86 |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 83 | ;; |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 84 | @@ -204,12 +211,12 @@ |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 85 | ;; |
| 86 | |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 87 | mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*) |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 88 | - TARGET=MIPS; TARGETDIR=mips |
| 89 | + TARGET=MIPS_IRIX; TARGETDIR=mips |
| 90 | ;; |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 91 | mips*-*-linux* | mips*-*-openbsd*) |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 92 | # Support 128-bit long double for NewABI. |
| 93 | HAVE_LONG_DOUBLE='defined(__mips64)' |
| 94 | - TARGET=MIPS; TARGETDIR=mips |
| 95 | + TARGET=MIPS_IRIX; TARGETDIR=mips |
| 96 | ;; |
| 97 | |
| 98 | powerpc*-*-linux* | powerpc-*-sysv*) |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 99 | @@ -269,7 +276,7 @@ |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 100 | AC_MSG_ERROR(["libffi has not been ported to $host."]) |
| 101 | fi |
| 102 | |
| 103 | -AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS) |
| 104 | +AM_CONDITIONAL(MIPS,[expr x$TARGET : 'xMIPS' > /dev/null]) |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 105 | AM_CONDITIONAL(BFIN, test x$TARGET = xBFIN) |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 106 | AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC) |
| 107 | AM_CONDITIONAL(X86, test x$TARGET = xX86) |
Gregory P. Smith | 029273f | 2013-03-18 17:11:20 -0700 | [diff] [blame] | 108 | @@ -567,4 +574,8 @@ |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 109 | |
Matthias Klose | fb60f80 | 2010-03-19 17:47:21 +0000 | [diff] [blame] | 110 | AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile man/Makefile libffi.pc) |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 111 | |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 112 | +AC_CONFIG_LINKS(include/ffi_common.h:include/ffi_common.h) |
| 113 | + |
| 114 | +AC_CONFIG_FILES(fficonfig.py) |
Matthias Klose | fb60f80 | 2010-03-19 17:47:21 +0000 | [diff] [blame] | 115 | + |
Benjamin Peterson | 25c95f1 | 2009-05-08 20:42:26 +0000 | [diff] [blame] | 116 | AC_OUTPUT |
doko@ubuntu.com | 2a91876 | 2012-06-26 17:56:44 +0200 | [diff] [blame] | 117 | --- libffi-3.0.11/fficonfig.py.in 1970-01-01 01:00:00.000000000 +0100 |
| 118 | +++ libffi/fficonfig.py.in 2012-03-15 01:04:27.000000000 +0100 |
| 119 | @@ -0,0 +1,35 @@ |
| 120 | +ffi_sources = """ |
| 121 | +src/prep_cif.c |
| 122 | +src/closures.c |
| 123 | +src/dlmalloc.c |
| 124 | +""".split() |
| 125 | + |
| 126 | +ffi_platforms = { |
| 127 | + 'MIPS_IRIX': ['src/mips/ffi.c', 'src/mips/o32.S', 'src/mips/n32.S'], |
| 128 | + 'MIPS_LINUX': ['src/mips/ffi.c', 'src/mips/o32.S'], |
| 129 | + 'X86': ['src/x86/ffi.c', 'src/x86/sysv.S'], |
| 130 | + 'X86_FREEBSD': ['src/x86/ffi.c', 'src/x86/freebsd.S'], |
| 131 | + 'X86_WIN32': ['src/x86/ffi.c', 'src/x86/win32.S'], |
| 132 | + 'SPARC': ['src/sparc/ffi.c', 'src/sparc/v8.S', 'src/sparc/v9.S'], |
| 133 | + 'ALPHA': ['src/alpha/ffi.c', 'src/alpha/osf.S'], |
| 134 | + 'IA64': ['src/ia64/ffi.c', 'src/ia64/unix.S'], |
| 135 | + 'M32R': ['src/m32r/sysv.S', 'src/m32r/ffi.c'], |
| 136 | + 'M68K': ['src/m68k/ffi.c', 'src/m68k/sysv.S'], |
| 137 | + 'POWERPC': ['src/powerpc/ffi.c', 'src/powerpc/sysv.S', 'src/powerpc/ppc_closure.S', 'src/powerpc/linux64.S', 'src/powerpc/linux64_closure.S'], |
Benjamin Peterson | 19886b8 | 2013-06-19 09:01:42 -0700 | [diff] [blame] | 138 | + 'POWERPC_AIX': ['src/powerpc/ffi_darwin.c', 'src/powerpc/aix.S', 'src/powerpc/aix_closure.S'], |
doko@ubuntu.com | 2a91876 | 2012-06-26 17:56:44 +0200 | [diff] [blame] | 139 | + 'POWERPC_FREEBSD': ['src/powerpc/ffi.c', 'src/powerpc/sysv.S', 'src/powerpc/ppc_closure.S'], |
| 140 | + 'ARM': ['src/arm/sysv.S', 'src/arm/ffi.c'], |
| 141 | + 'LIBFFI_CRIS': ['src/cris/sysv.S', 'src/cris/ffi.c'], |
| 142 | + 'FRV': ['src/frv/eabi.S', 'src/frv/ffi.c'], |
| 143 | + 'S390': ['src/s390/sysv.S', 'src/s390/ffi.c'], |
| 144 | + 'X86_64': ['src/x86/ffi64.c', 'src/x86/unix64.S', 'src/x86/ffi.c', 'src/x86/sysv.S'], |
| 145 | + 'SH': ['src/sh/sysv.S', 'src/sh/ffi.c'], |
| 146 | + 'SH64': ['src/sh64/sysv.S', 'src/sh64/ffi.c'], |
| 147 | + 'PA': ['src/pa/linux.S', 'src/pa/ffi.c'], |
| 148 | + 'PA_LINUX': ['src/pa/linux.S', 'src/pa/ffi.c'], |
| 149 | + 'PA_HPUX': ['src/pa/hpux32.S', 'src/pa/ffi.c'], |
| 150 | +} |
| 151 | + |
| 152 | +ffi_sources += ffi_platforms['@TARGET@'] |
| 153 | + |
| 154 | +ffi_cflags = '@CFLAGS@' |
| 155 | diff -urN libffi-3.0.11/src/dlmalloc.c libffi/src/dlmalloc.c |
| 156 | --- libffi-3.0.11/src/dlmalloc.c 2012-04-12 04:46:06.000000000 +0200 |
| 157 | +++ libffi/src/dlmalloc.c 2012-06-26 15:15:58.949547461 +0200 |
| 158 | @@ -457,6 +457,11 @@ |
| 159 | #define LACKS_ERRNO_H |
| 160 | #define MALLOC_FAILURE_ACTION |
| 161 | #define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */ |
| 162 | +#elif !defined _GNU_SOURCE |
| 163 | +/* mremap() on Linux requires this via sys/mman.h |
| 164 | + * See roundup issue 10309 |
| 165 | + */ |
| 166 | +#define _GNU_SOURCE 1 |
| 167 | #endif /* WIN32 */ |
| 168 | |
| 169 | #ifdef __OS2__ |