[PATCH]: Allow the use of i386/darwin with ELF

Luboš Doležel via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 13 06:53:56 PST 2015


Hello,

I'm the developer of Darling, a translation layer for running OS X
binaries on Linux.

I'm facing many difficulties due to the following differences in i386
ABI between Darwin and Linux:

* size_t on Darwin/i386 is 'unsigned long', but Linux/i386 uses
'unsigned int' (=> different mangled names).
* long double on Darwin/i386 is 128 bits long, but Linux/i386 uses only
96 bits.

This problem can be overcome by specifying '-target
i386-unknown-darwin-elf', but this currently fails due to a different
data layout string (Darwin specifies Mach-O).

The attached patch allows the use of ELF with the DarwinI386 target. It
is identical to what is already done in the WindowsX86_32 target.

Pretty please, include my patch, as it would be very helpful and it's a
rather small change.

Thanks,
-- 
Luboš Doležel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: i386-darwin-with-elf.patch
Type: text/x-patch
Size: 706 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151213/34116889/attachment.bin>


More information about the cfe-commits mailing list