This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: PATCH RFC: Recognize gold in libstdc++ configure script
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Fri, 28 Mar 2008 12:18:14 -0500
- Subject: Re: PATCH RFC: Recognize gold in libstdc++ configure script
- References: <m3prtfwkpj.fsf@google.com>
> 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.
I would imagine that eventually you'll have to add something like
with_gnu_ld_gold to top level, and that would subsume
glibcxx_ld_is_gold, huh? Just curious about your longer-term
plan. (I think libgfortran also uses -z relo so it would need
modification to work on too.)
> This patch fixes the problems for me. Does this seem reasonable, or
> would people prefer a different approach?
This seems reasonable to me. Thanks!
-benjamin