Jeff Stevens wrote: > Is there a HowTo out there on how to cross compile GCC > to run on another platform? I have an x86 host > running linux, and an embedded PowerPC 440SP target > running linux. I would like to compile GCC to run on > the target but am having some difficulties. I have > compiled the cross compiler fine, but when I try to > compile a native compiler, it acts just like the cross > compiler (runs on the host and not the target). All I
*All* compilers "run on the host"; the term "host" is defined as "the machine on which the compiler runs". The target is the machine on which the _generated_ code runs. So for a native compiler, host==target, and for a cross-compiler, host!=target. > did was re-run gcc configure and "make all install". > Here is the configuration I ran: > > ../../source/gcc-3.4.4/configure > --target=powerpc-linux --host=powerpc-linux > --prefix=/opt/luan2/toolchain/bin --enable-shared > --enable-threads --enable-languages=c If you want a native compiler, you would want to have an x86 target where you've written powerpc-linux. Even better, to get a native compiler, just don't specify --target or --host at all; configure will assume by default that you want a native compiler, work out what machine it thinks you're running on, and set up everything just right for you, automatically! > I'm obviously missing something, but can't seem to > find anything on the internet that explains > cross-compiling gcc for another target. Check the cross-gcc mailing list http://sourceware.org/ml/crossgcc/, and Dan Kegel's crosstool http://kegel.com/crosstool/. cheers, DaveK -- Can't think of a witty .sigline today....