This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: PATCH RFC: Recognize gold in libstdc++ configure script


On Fri, Mar 28, 2008 at 12:18:14PM -0500, Benjamin Kosnik wrote:
> 
> > The libstdc++ configure script does some direct comparisons of the
> > linker version number.  These comparisons do not work for gold, a new
> > ELF linker.
> 
> Yeah. Usually the version number compares are just because we cannot
> figure out a better way to do it. (ie, feature test.)
>  
> > It would not be appropriate for gold to simply pretend that it is GNU
> > ld.  Not only is that not correct, it would actually give the
> > incorrect result.  The libstdc++ configure script uses a version
> > number test to check whether the linker supports --gc-sections; gold
> > does not.
> 
> OK. From what I understand, gold also does not support things like -z
> relo, right? (And the existing configure test doesn't have to be
> modified? Seems like it will work as-is.)
> 
> So, your behavior is
> 
> with_gnu_ld == yes for ld and gold
> glibcxx_ld_is_gold == yes for gold only
> 
> Seems sane.

It depends.  If the test is for gold because gold is missing a feature,
another change is needed when the feature is eventually added to gold (in
this case, --gc-sections).  I assume that at some point you (Ian) or
someone will add it, right?

How about testing directly whether the linker supports --gc-sections?



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