This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] LTO support for Mach-O (apple-darwin)
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Mike Stump <mikestump at comcast dot net>, Richard Guenther <richard dot guenther at gmail dot com>, Diego Novillo <dnovillo at google dot com>, Jack Howarth <howarth at nitro dot msbb dot uc dot edu>
- Date: Sun, 2 May 2010 17:02:54 +0200
- Subject: Re: [patch] LTO support for Mach-O (apple-darwin)
- References: <q2t571f6b511005020353o83872c45ydf898d748b164f05@mail.gmail.com> <4BDD8D7A.20603@gmail.com>
On Sun, May 2, 2010 at 4:34 PM, Dave Korn
<dave.korn.cygwin@googlemail.com> wrote:
> On 02/05/2010 11:53, Steven Bosscher wrote:
>
>> ? ? ? * lto-endian.h: New file.
>
> ?This file begins with this comment:
>
>> + ? enable cross-compilation with LTO enabled. ?Targets that use the
>> + ? ELF binary object format do not need this (libelf already handles
>> + ? endian-ness) but for COFF and Mach-O the functions in this header
>> + ? are used in the minimal binary object reader/writer.
>
> ?Except that's not correct w.r.t COFF, because you didn't go with your
> original plan to share the common code, and you've renamed all the functions
> so we can't simply change one #include, delete the definitions from
> lto-coff.h, and have it "just work". ?Given that, I can't see the point in
> making it a separate file anymore; doing so would just be introducing yet
> another partial transition to no particular end, so why not just put the
> contents in lto-macho.h instead?
I plan to modify the lto-coff code to use lto-endian.h. I just don't
know how to test it yet. My plan was to first get this patch in, and
then modify lto-coff.
(Note I have unsigned char everywhere, and you have char, but
otherwise things are the same. If I use char, I get lots of bootstrap
warnings, i.e. errors with -Werror. That is why I didn't use your code
as-is in the end...)
Ciao!
Steven