OLD | NEW |
1 diff --git a/configure b/configure | 1 diff --git a/configure b/configure |
2 --- a/configure | 2 --- a/configure |
3 +++ b/configure | 3 +++ b/configure |
4 @@ -17074,6 +17099,10 @@ fi | 4 @@ -17074,6 +17099,10 @@ fi |
5 TARGETDIR="unknown" | 5 TARGETDIR="unknown" |
6 HAVE_LONG_DOUBLE_VARIANT=0 | 6 HAVE_LONG_DOUBLE_VARIANT=0 |
7 case "$host" in | 7 case "$host" in |
8 + *nacl*) | 8 + *nacl*) |
9 + TARGET=NACL; TARGETDIR=x86 | 9 + TARGET=NACL; TARGETDIR=x86 |
10 + ;; | 10 + ;; |
11 + | 11 + |
12 aarch64*-*-*) | 12 aarch64*-*-*) |
13 TARGET=AARCH64; TARGETDIR=aarch64 | 13 TARGET=AARCH64; TARGETDIR=aarch64 |
14 ;; | 14 ;; |
15 diff --git a/src/types.c b/src/types.c | 15 diff --git a/src/types.c b/src/types.c |
16 --- a/src/types.c | 16 --- a/src/types.c |
17 +++ b/src/types.c | 17 +++ b/src/types.c |
18 @@ -33,6 +33,38 @@ | 18 @@ -33,6 +33,38 @@ |
19 | 19 |
20 /* Type definitions */ | 20 /* Type definitions */ |
21 | 21 |
22 +#ifdef __native_client__ | 22 +#ifdef __native_client__ |
23 +/* | 23 +/* |
24 + * Dummy implementation of libffi functions. This may be an incomplete | 24 + * Dummy implementation of libffi functions. This may be an incomplete |
25 + * list. It was intented to be enough to allow glib to be built. | 25 + * list. It was intented to be enough to allow glib to be built. |
26 + * TODO(sbc): Remove this once we fix libffi: | 26 + * TODO(sbc): Remove this once we fix libffi: |
27 + * https://code.google.com/p/naclports/issues/detail?id=183 | 27 + * https://bugs.chromium.org/p/webports/issues/detail?id=183 |
28 + */ | 28 + */ |
29 +void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) { | 29 +void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) { |
30 + abort(); | 30 + abort(); |
31 +} | 31 +} |
32 + | 32 + |
33 +ffi_status ffi_prep_cif_machdep(ffi_cif *cif) { | 33 +ffi_status ffi_prep_cif_machdep(ffi_cif *cif) { |
34 + abort(); | 34 + abort(); |
35 + return FFI_BAD_ABI; | 35 + return FFI_BAD_ABI; |
36 +} | 36 +} |
37 + | 37 + |
38 +ffi_status ffi_prep_closure_loc(ffi_closure *closure, ffi_cif* cif, | 38 +ffi_status ffi_prep_closure_loc(ffi_closure *closure, ffi_cif* cif, |
39 + void (*fun)(ffi_cif*,void*,void**,void*), void *user_data, void *codeloc) | 39 + void (*fun)(ffi_cif*,void*,void**,void*), void *user_data, void *codeloc) |
40 +{ | 40 +{ |
41 + abort(); | 41 + abort(); |
42 + return FFI_BAD_ABI; | 42 + return FFI_BAD_ABI; |
43 +} | 43 +} |
44 + | 44 + |
45 +ffi_status ffi_prep_raw_closure_loc(ffi_raw_closure *closure, ffi_cif *cif, | 45 +ffi_status ffi_prep_raw_closure_loc(ffi_raw_closure *closure, ffi_cif *cif, |
46 + void (*fun)(ffi_cif*,void*,ffi_raw*,void*), void *user_data, | 46 + void (*fun)(ffi_cif*,void*,ffi_raw*,void*), void *user_data, |
47 + void *codeloc) { | 47 + void *codeloc) { |
48 + abort(); | 48 + abort(); |
49 + return FFI_BAD_ABI; | 49 + return FFI_BAD_ABI; |
50 +} | 50 +} |
51 +#endif | 51 +#endif |
52 + | 52 + |
53 + | 53 + |
54 #define FFI_TYPEDEF(name, type, id, maybe_const)\ | 54 #define FFI_TYPEDEF(name, type, id, maybe_const)\ |
55 struct struct_align_##name { \ | 55 struct struct_align_##name { \ |
56 char c; \ | 56 char c; \ |
OLD | NEW |