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


> 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 is really up to user to understand -fwhole-program and mark externally visible
symbols.  Your testcase is quite ugly in a way that it leads to miscopmilation
rather than linktime error, but there is not much we can do about it I guess.
Perhaps we can somehow poison the object names that are brought local with -fwhole-program
so linking explode, but I am not sure there is way to do so.

Honza


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