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



> -----Original Message-----
> From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On Behalf Of
> Ian Lance Taylor
> Sent: 14 June 2010 05:43
> To: David Brown
> Cc: gcc@gcc.gnu.org
> Subject: Re: Issue with LTO/-fwhole-program
> 
> David Brown <david.brown@hesbynett.no> writes:
> 
> > After doing a bit more reading and thinking, it seems to me that
> > -fwhole-program will be used in most cases where LTO is used.  You
> use
> > -flto when compiling each source file, then link them with gcc with
> > -flto and -fwhole-program.  Except in the case of libraries or other
> > files which need external symbols, you will want that combination to
> > generate optimal code.  So if this combination alone, without common
> > symbols, is going to cause problems, then this would be a much bigger
> > issue than if it is only triggered by common symbols.
> 
> That scenario is fine.
> 
> You can look back to see the problematic case posted earlier.  It was
> a case where one file was compiled with -flto, one file was compiled
> without -flto, both files defined a common symbol with the same name,
> the object files were linked together using -flto -fwhole-program, and
> the gold plugin was not used.  All elements are essential to recreate
> the problem.

Actually, gold plugin is used in the original example. However, resolution
produced by plugin is bypassed due to a bug-fix by Richard.  Do you have any
comment on that:
http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01116.html

Bingfeng



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