cross compiler vs. native compiler

Kevin Buettner plug-discuss@lists.plug.phoenix.az.us
Wed, 20 Mar 2002 14:04:47 -0700


On Mar 20,  1:36pm, der.hans wrote:

> Am 20. Mar, 2002 schwätzte Craig S. so:
> 
> > I was reading the 2.4.18 install documentation and am thinking some of
> > my problems are stemming from older versions of gcc and make.
> > While reading the install document for gcc there are two types of
> > compilers discussed, native and cross. I am assuming that the original
> > gcc package that came with slackware 7.1 is setup as a native compiler.
> > Thought I would ask to see if this is correct.
> 
> Yes.
> 
> It might also be a cross-compiler. Cross-compilers are used to build for a
> hardware architecture other than the one the compiler is running on. For
> instance, the iPAQ has a strongarm processor, but you can use your x86
> desktop to compile programs for the strongarm.
> 
> I think cross-compiling can be done by just giving some options to the
> normal compiler ( provided it's setup to know how to cross-compile ). I
> think that's what I did for the PPC a couple of years ago. Maybe we'll get
> lucky and one of the guys who really knows this stuff will pipe up :).

To the best of my knowledge, it's not possible to configure gcc to
target more than one architecture at a time.  It is possible for gcc
to handle different architecture variants (and ABIs) though via the
various -m switches.  Perhaps that's what you're remembering.

Craig will want to read the instructions regarding native compilers.

Kevin