This is the mail archive of the
mailing list for the GCC project.
Re: Issue with LTO/-fwhole-program
Manuel LÃpez-IbÃÃez <firstname.lastname@example.org> writes:
> On 11 June 2010 15:26, Jan Hubicka <email@example.com> wrote:
>>> Ah, so the problem is the missing -flto in the second compilation
>>> step? I think this is a bug in the compiler for not reporting this
>>> somehow. Is there are PR open for this?
>> Compiler can not report it because it does not see the other object files.
> It does see the object files in the final compilation step (perhaps
> the compiler does not read them but it could). And files compiled with
> LTO or without LTO are clearly differentiable. So I don't see anything
> technical stopping the compiler to give a warning about such dubious
> setup. Should I open a PR?
Think about the case where the various objects are in an archive. To
give this warning correctly in all cases you are essentially going to
have to import the linker's symbol resolution mechanism into the
compiler. The linker plugin mechanism was designed to precisely avoid