gcc_tooldir

H. J. Lu hjl@lucon.org
Fri Sep 12 21:09:00 GMT 2003


On Fri, Sep 12, 2003 at 10:19:02PM +0200, Marcus Comstedt wrote:
> 
> "H. J. Lu" <hjl@lucon.org> writes:
> 
> > On Fri, Sep 12, 2003 at 09:52:10PM +0200, Marcus Comstedt wrote:
> > > 
> > > Hello.
> > > 
> > > gcc/Makefile defines gcc_tooldir as
> > > 
> > >   gcc_tooldir = $(libsubdir)/$(unlibsubdir)/../$(target_alias)
> > > 
> > > where $(unlibsubdir) is ../../..
> > > 
> > > Is there any reason for this convolution as opposed to just setting
> > > 
> > 
> > So you can relocate gcc to a different directory.
> 
> Um.  Please explain this.  Not only do the paths get compiled into
> gcc, but they also go through an unrelated directory so that they will
> be wrong even if you move _that_ directory.  Just how does this
> arrangement make gcc more relocatable?

You can relocate the whole gcc to a different direcory since everything
is referenced relatively. That is even if you configured gcc with
--prefix=foo, you can move it "bar" and it should work fine.
> 
> 
> > > ?  The construction with all the ..'s is rather inconvenient since it
> > > depends on the existence of $(libsubdir), and on the absence of
> > > symlinks along the way.
> > 
> > That is a known problem.
> 
> So what is the proposed solution?
> 

Please follow

http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00830.html


H.J.



More information about the Gcc mailing list