Building native compiler from cross compiler

David Hoover jazzdaq@yahoo.com
Mon Aug 4 07:45:00 GMT 2003


Hi,

Is there any straightforward way to create a native compiler from a 
cross compiler?

I have a Sharp Zaurus with an XScale processor for which I would like to 
build a native compiler from the GCC source.  My cross compiler  
X86/GNU/Linux --> Xscale/GNU/Linux seems to work fine.  If I try to use 
the cross compiler to compile a native XScale GCC,  I run into trouble 
because the make process tries to execute some XScale code on the X86 
machine.

Is it posible to do something like:

1) export via NFS the GCC tree to XScale machine

2) cross compile some basic gcc utilities from X86

3) execute intermediate XScale binaries locally on XScale machine to 
create intermediate files

4) repeat steps 2 and 3 until stage1 native XScale compiler is complete

5) compile successive stages locally on XScale machine.

??

It seems like creating a native compiler from a cross compiler is a 
basic necessity when new architectures appear.  Could some kind of 
automation be built into the gcc build process?  Are there certain make 
sub-targets that need to be run on the host and others that need to be 
run on the target machine to do this?

Thanks,

David Hoover.








More information about the Gcc-help mailing list