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


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.

Oh well, I have a work around, so it's no panic.  I just figure there 
must be a better way.

-- 
"Backwards compatibility is nice, but preserving every undocumented quirk
that nobody sane would use... Sorry, but we really need an addition to
errno.h: EBITEME. Exactly for such cases." 
 -- Alexander Viro


------
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]