[PATCH] Workaround ARM VFP issue

Chung-Lin Tang cltang@codesourcery.com
Tue Mar 6 09:58:00 GMT 2012


This is patch to workaround the issue mentioned in this thread:
http://sourceware.org/ml/libffi-discuss/2012/msg00038.html

The issue is not really that soft-float is broken, but rather the
toolchain used is simply too old, not really because it is old-ABI, but
too old a version of binutils; the .fpu directive, nor VFP instructions
are supported in the assembler, hence even building of the VFP
call/closure shims fail.

This patch is sort of a least attempt to shield away the VFP stuff when
__ARM_EABI__ is not defined. I apologize for such a token workaround, as
it can probably be optimized a bit more, but I just feel it's not
worthwhile; even GCC (recent versions) assumes such assembler features.

Kyle, can you please see if the patch can work for you? If in case it
doesn't, I might also suggest that you try to rebuild your toolchain
with a newer binutils version (at least post circa 2005), which should
at least not fail to build the library.

Thanks,
Chung-Lin

2012-03-06  Chung-Lin Tang  <cltang@codesourcery.com>

	* src/arm/ffi.c (ffi_call): Add __ARM_EABI__ guard around call
	to ffi_call_VFP().
	(ffi_prep_closure_loc): Add __ARM_EABI__ guard around use of
	ffi_closure_VFP.
	* src/arm/sysv.S: Add __ARM_EABI__ guard around VFP code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/applefile
Size: 430 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libffi-discuss/attachments/20120306/fec4c089/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffi.diff
Type: application/octet-stream
Size: 1311 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libffi-discuss/attachments/20120306/fec4c089/attachment.obj>


More information about the Libffi-discuss mailing list