This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: toplevel foo_for_target
- To: Richard Henderson <rth at redhat dot com>
- Subject: Re: toplevel foo_for_target
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: 18 Mar 2001 14:56:44 -0800
- CC: gcc-patches at gcc dot gnu dot org
- References: <20010318132338.A1010@redhat.com>
Richard Henderson <rth@redhat.com> writes:
> Does anyone know why toplevel makefile computes AS_FOR_TARGET
> and LD_FOR_TARGET? AFAICT, all it does it screw up the more
> proper detection that libtool would do.
>
> For instance, on Solaris, if /some/path/{gcc,ld,as} full of
> gnu tools is in my path, but gcc is configured with prefix of
> /some/otherpath/ that does not contain gnu binutils, then gcc
> will prefer to use /usr/ccs/bin/{as,ld}. Which is fine.
>
> But then the toplevel makefile will set LD=ld when configuring
> libstdc++-v3, causing configure to ignore the output from
> xgcc --print-file-name=ld, causing libtool to be configured
> for the wrong linker, causing the build to fail when we go to
> link libstdc++.so.
>
> Anyone see anything wrong with the following patch?
The main point of LD_FOR_TARGET, etc., is so they can be set to
../ld/ld-new for single-tree builds. If this patch has everything
still using the just-built linker for single-tree builds, then it's
probably OK.
(Don't forget that some subtree builds don't use libtool, particularly
newlib.)
--
- Geoffrey Keating <geoffk@geoffk.org>