This is the mail archive of the
mailing list for the GCC project.
Re: [patch] LTO support for Mach-O (apple-darwin)
- From: IainS <idsandoe at googlemail dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Mike Stump <mikestump at comcast dot net>, Jack Howarth <howarth at nitro dot med dot uc dot edu>
- Date: Tue, 4 May 2010 20:26:12 -0700
- Subject: Re: [patch] LTO support for Mach-O (apple-darwin)
- References: <email@example.com>
On 2 May 2010, at 03:53, Steven Bosscher wrote:
This patch adds support for LTO on Mach-O targets, i.e. darwin.
There are a couple of funny things this patch does to make LTO work on
Mach-O. The most noticeable is that I had to capture assembler output
in the LTO generate phase and redirect it to a temporary file. The
reason is that you can only define relocations in a relocatable Mach-O
object for the first 255 sections, although there doesn't seem to be a
limit to the number of sections you can add. So I want all non-LTO
sections output before the LTO sections.
I want to understand this better -- I don't think we name anything
like 255 distinct sections (even with OBJC2 ones in place).
and appear to work, but I run into some issues with Mach-O PIC on
32-bits darwin that I don't know (yet?) how to fix. So 32-bits Mach-O
LTO support is left as an exercise for the interested reader ;-)
I've applied your patch on top of all my patches (I.m on vacation and
don't have the luxury of several independent trees) .. and
bootstrapped on i686.
I've a hunch that the issue is that variables are being optimized away
by the lto - but the references need to be re-written .. but that's a
thought-experiment and I won't be able to do much more until back in
I'll also try powerpc and ppc64 at some stage,,,,