This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


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

Re: [PATCH]: ld/Makefile.am


On Fri, Mar 10, 2000 at 06:05:39PM -0300, Alexandre Oliva wrote:
> On Mar 10, 2000, "H . J . Lu" <hjl@lucon.org> wrote:
> 
> > When collect2 calls ld-new, it sets up everything for the gcc
> > driver which calls it.
> 
> What does it mean ``to set up everything for the gcc driver which
> calls it''?  In the build tree, there isn't any program named `gcc'
> that the libtool wrapper might be running?  So why oh why is it being
> called recursively?
> 

Please remember that ld/ld-new is called by collect2 which is called
by the new gcc. When the new gcc runs, it sets up GCC_EXEC_PREFIX,
INIT_ENVIRONMENT, COMPILER_PATH and LIBRARY_PATH which point to
itself which is the new gcc. When collect2 calls ld/ld-new, it
passes all those to ld/ld-new. When ld/ld-new calls "gcc", which
is the correct compiler to build the whole chain, that gcc driver
will see GCC_EXEC_PREFIX, INIT_ENVIRONMENT, COMPILER_PATH and
LIBRARY_PATH set up by the new gcc. Of course, it won't work.
ld/ld-new tries 4 times to relink the new ld. Every time it will
append at least COMPILER_PATH and maybe other environment variables.
It won't help anything.


H.J.

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