This is the mail archive of the 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: gcc ARM CPU's


On Monday 17 November 2008 05:57:09 Vivek Kumar Gupta wrote:
> Here actually I am asking "Can it be possible to give two values
> together separated by comma."
> Like in Tune for CPU : arm922t,cortex-m3

No it's not. When you call your cross gcc, it has to know what specific
architecture variant to emit code for. You usually do so by using the
-march=... -mcpu=... (et al) gcc flags.

If you don't tell gcc what variant to emit code for, it will fallback to
using a default one. That what these config options are for, to set the
default variant gcc will emit code for, when *no* -march=... -mcpu=...
flags are used.

> Reason for this, I want a single compiler for both ARM 922T and Cortex
> M3 boards. 

That absolutely possible! Configure your toolchain to emit code for, say,
the Cortex M3 (is it supported?), and your cross gcc will by default
emit code for the Cortex M3. Now call you cross gcc with -mcpu=arm922t
and it will emit code for the ARM 922T processor.

But still, gcc has to know what the default variant is. If you don't set
a default variant with the crosstool-NG options, the gcc ./configure will
decide  on its own. And I don't know what it is, but you will be able
to use that toolchain for all the processors in the same architecture,
provided you use adequate -march=... -mcpu=... (and others) flags.

> Right now it seems like I have to generate two compiler tool chains by
> giving ARM Core Processor Types. 

No, see above.

You need to build two cross-compilers if you want it to by have two different
default variant selected.

Yann E. MORIN.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  X  AGAINST      |  \e/  There is no  |
| | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

For unsubscribe information see

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