This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] LTO support for Mach-O (apple-darwin)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]