This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/41529] LTO configuration should detect if the target is ELF
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jan 2010 13:56:13 -0000
- Subject: [Bug bootstrap/41529] LTO configuration should detect if the target is ELF
- References: <bug-41529-91@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from rguenther at suse dot de 2010-01-02 13:56 -------
Subject: Re: LTO configuration should detect if the
target is ELF
On Sat, 2 Jan 2010, davek at gcc dot gnu dot org wrote:
> ------- Comment #11 from davek at gcc dot gnu dot org 2010-01-02 13:51 -------
> (In reply to comment #10)
> > FAIL: gcc.dg/lto/20081201-2 c_lto_20081201-2_0.o-c_lto_20081201-2_1.o execute
> > -O3 -fwhopr
> >
> > this means you do not get any LTO optimization (it's really the only test
> > that tests this ....)
> >
> > So LTO is not working for you.
>
> Righto, I'll look at that one first.
>
> Are you aware of any structural reason why LTO can't possibly work on a
> non-ELF platform?
The only part that really relies on native ELF object files is
the mixing of LTO sections with regular object code as produced
by cc1 - lto1 relies on libelf to identify and read the LTO sections,
which probably does not work.
And of course the linker-plugin and symbol resolution stuff done
by it - but the linker-plugin is gold only and ELF only anyway.
The collect2 stuff should in principle work with non-ELF targets
as well if you circumvent that first problem somehow (for
example by not producing regular object code from cc1 but only
assemble the LTO sections to a ELF object file).
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41529