This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Pre defined #defines for different cross compilers ?


On 2003/09/30 at 11:42 Dan Kegel wrote:

>Anton Erasmus wrote:
>> As far as I understand autoconf, configures for the platform one is
>> compiling on.
>
>Right.  But that's ok; the idea is autoconf lets you adapt
>to the platform.  Using autoconf, you can write a program
>that is portable to zillions of targets.
>
> > Can one say configure on a cygwin host for a program
>> that will run on a mips machine under linux ?
>
>No, of course not.
>
>> The only info regarding
>> the target environment as far as I can see is within the cross compile
>> tool environment.
>
>That's right.  So what's the problem?  Maybe you misunderstand
>how autoconf is used.  Running configure doesn't generate a portable
>program; it's the combination of configure plus the source code that
>is portable.
>- Dan

It is quite likely that I am misunderstanding how autoconf works.
If I want to compile code that runs on an embedded ARM. Say my
compiler is hosted under cygwin. If I run configure on my host,
it will configure the makefile etc. as if the code was going to run on
the host ? Is it possible with autoconf to say do:
./configure ARM-FLASH
or
./configure MIPS-RAM
to be able to build the code to run from flash on an embedded controller,
and for the second configure to build code that will run from RAM from a
MIPS controller ?

The above is probably quite similar to building a canadian-cross gcc toolset.
The how-tos I have regarding this subject is quite old. Can the standard gcc
configure be used to configure for a canadian cross ? I particularly would like
to be able to build a cygwin hosted ARM, PPC etc cross compiler on a
linux host. Using cygwin as the host has been a bit of a hit and miss afair.


Regards
   Anton Erasmus



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


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