libffi: fix problems with gcc-4.0 on 32-bit Mac OS X

Based in part on https://trac.macports.org/changeset/122079
This commit is contained in:
Matthew Flatt 2014-10-28 08:04:05 -06:00
parent 01b0c11249
commit 8e34ef3a9d
2 changed files with 8 additions and 2 deletions

View File

@ -7,4 +7,8 @@ Our copy of libffi for Racket has been changed in a few small:
warning.
* In "x86/darwin.S", added ".long 0" after ".LFE3:" to avoid
linker problems compiling with gcc-4.0 on Mac OS X 10.7.
problems compiling with gcc-4.0.
* In "x86/win32.S", added ".long 0" after ".LFE5:" and ".LEFDE5", and
also included `.section .eh_frame,"w"` for X86_DARWIN --- again,
all to avoid problems compiling with gcc-4.0.

View File

@ -1132,6 +1132,7 @@ USCORE_SYMBOL(ffi_closure_STDCALL):
2: jmp *%edx
.ffi_closure_STDCALL_end:
.LFE5:
.long 0
#if defined(X86_DARWIN)
.section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5
@ -1140,7 +1141,7 @@ L_ffi_closure_SYSV_inner$stub:
hlt ; hlt ; hlt ; hlt ; hlt
#endif
#if defined(X86_WIN32) && !defined(__OS2__)
#if (defined(X86_WIN32) || defined(X86_DARWIN)) && !defined(__OS2__)
.section .eh_frame,"w"
#endif
.Lframe1:
@ -1301,6 +1302,7 @@ L_ffi_closure_SYSV_inner$stub:
/* End of DW_CFA_xxx CFI instructions. */
.align 4
.LEFDE5:
.long 0
#endif /* !_MSC_VER */