1 # Fix for building on xX86_64 Solaris. |
|
2 # This fix was already sent upstream and is in later versions |
|
3 --- libffi/configure.ac Mon Mar 15 19:47:38 2010 +0100 |
|
4 +++ libffi/configure.ac Mon Mar 15 19:47:38 2010 +0100 |
|
5 @@ -284,6 +284,21 @@ |
|
6 ;; |
|
7 esac |
|
8 |
|
9 +if test x$TARGET = xX86_64; then |
|
10 + AC_CACHE_CHECK([assembler supports unwind section type], |
|
11 + libffi_cv_as_x86_64_unwind_section_type, [ |
|
12 + libffi_cv_as_x86_64_unwind_section_type=yes |
|
13 + echo '.section .eh_frame,"a",@unwind' > conftest.s |
|
14 + if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then |
|
15 + libffi_cv_as_x86_64_unwind_section_type=no |
|
16 + fi |
|
17 + ]) |
|
18 + if test "x$libffi_cv_as_x86_64_unwind_section_type" = xyes; then |
|
19 + AC_DEFINE(HAVE_AS_X86_64_UNWIND_SECTION_TYPE, 1, |
|
20 + [Define if your assembler supports unwind section type.]) |
|
21 + fi |
|
22 +fi |
|
23 + |
|
24 AC_CACHE_CHECK([whether .eh_frame section should be read-only], |
|
25 libffi_cv_ro_eh_frame, [ |
|
26 libffi_cv_ro_eh_frame=no |
|
27 --- libffi/src/x86/unix64.S Mon Mar 15 19:47:38 2010 +0100 |
|
28 +++ libffi/src/x86/unix64.S Mon Mar 15 19:47:38 2010 +0100 |
|
29 @@ -324,7 +324,11 @@ |
|
30 .LUW9: |
|
31 .size ffi_closure_unix64,.-ffi_closure_unix64 |
|
32 |
|
33 +#ifdef HAVE_AS_X86_64_UNWIND_SECTION_TYPE |
|
34 + .section .eh_frame,"a",@unwind |
|
35 +#else |
|
36 .section .eh_frame,"a",@progbits |
|
37 +#endif |
|
38 .Lframe1: |
|
39 .long .LECIE1-.LSCIE1 /* CIE Length */ |
|
40 .LSCIE1: |
|