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

See the CrossGCC FAQ for lots more infromation.


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

Re: Re Crosscompiling a native compiler


Jeff Bailey wrote:

> On Mon, Jan 10, 2000 at 08:45:36AM +1100, Brendan J Simon wrote:
> > Jeff Bailey wrote:
> >
> > > I am having some difficulties now with the resultant compiler, because
> > > gcc doesn't know that crt1.o is /lib/crt1.o but you can burn that bridge
> > > when you come to it.  (Any suggestions from people would be wonderful!)
> > > The native compiler does, however, work once LD is told where to find them.
> >
> > So does "make" or "make cross" complete without errors ?
> > If so, I assume that "make install" is OK and that you are having problems
> > linking with /lib/crt1.0
> > If this is the case, you can try looking in the spec file.
>
> The way that I've been telling LD how to find them is by mucking in the
> specs file.  The interesting bit is with the files crt1.o crtn.o crti.o
> (I think there was one more, I'm not in the right OS right now).  In a
> natively compiled gcc, it knows to find them in /lib, even though the
> directory isn't specified in specs.  (Shown by gcc -v).  In a
> host==target!=build, gcc doesn't add the path to the collect2 call.
>
> As far as I can tell, at some point, gcc hard codes those paths into the
> executable.  What I want to try and find is what switch to use in order
> to set that.  What I've always done so far is to modify the specs file so
> that I can compile make, bison, and flex and then recompile the gcc
> natively so that I don't have my screwing around in there.

"gcc -print-search-dirs" will tell you the builtin search paths that gcc knows
about.  There might be a gcc switch to ignore them ?  One or more of -nostartfiles
, -nodefaultlibs  or -nostdlib may do the trick.  If not, then you may have to
edit configure and the gcc source to exclude some builtin directories to search.

I've just re-read your message and I think I misinterpreted it.
You are saying that the native compiler links OK because it does search /lib, but
the "Alaskan" compiler doesn't link because /lib is not in the built in search
path.  Is this correct ?
Have you checked your libraries for absolute path references ?
Surely you can specify an absolute library to link with in the specs file ?

Brendan Simon.




------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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