This is the mail archive of the gcc@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: Issue with LTO/-fwhole-program


Manuel LÃpez-IbÃÃez <lopezibanez@gmail.com> writes:

> On 11 June 2010 15:26, Jan Hubicka <hubicka@ucw.cz> 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
doing that.

Ian


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