Building gcc-3.0 cross sompiler

David Korn dkorn@pixelpower.com
Fri Aug 3 07:48:00 GMT 2001


>-----Original Message-----
>From: Mike Pelley [ mailto:mike@pelley.com ]
>Sent: 03 August 2001 14:23
>To: crossgcc@sources.redhat.com
>Subject: RE: Building gcc-3.0 cross sompiler
>
>
>Mike,
>I don't know what address is the GCC help.
>Please forward my question.
>
>Appreciated,
>Ronen.
>
>
>Hi,
>
>I am using the GCC compiler to compile/link a program for embedded target
>running PowerPC in LITTLE ENDIAN mode.
>
>I chose the following in the makefile : 
>
>-mcpu=powerpcle-*-eabi   (which I understand is the suitable for embedded
>PowerPC in little endian mode).

   Nope, that is wrong: what you have there is the generic 'target triple'
for a little-endian ppc compiler.  You would use this when building the
compiler itself to specify what kind of target you want the compiler to
produce code for.  When *using* (not building) the compiler, you tell it
which particular ppc cpu to use with an option like "-mcpu=604" or
"-mcpu=750".  The Gcc manual mentions it in the section "GNU CC Command
Options : Hardware Models and Configurations : IBM RS/6000 and PowerPC
Options"

-------snip!-------
" -mcpu=cpu_type 
Set architecture type, register usage, choice of mnemonics, and instruction
scheduling parameters for machine type cpu_type. Supported values for
cpu_type are `rs6000', `rios1', `rios2', `rsc', `601', `602', `603', `603e',
`604', `620', `power', `power2', `powerpc', `403', `505', `821', and `860'
and `common'. "
-------snip!-------

>DEFAULT_RULE   = vxWorks

  You do realise that vxWorks doesn't support little-endian mode for the
ppc, don't you ?  So your BSPs and vxworks OS libs will not work on a ppc
in little-endian mode, even though you can generate code for it with the
compiler ?  You should browse through appendix F in the "VxWorks Programmers
Guide" for further information, in particular part F.2 which tells you how
to use the gcc flags for Vxworks and part F.5 which give vxworks-ppc
architectural information.

        DaveK
-- 
"Computer games don't affect kids; I mean if Pac-Man affected us as kids,
we'd all be running around in darkened rooms, munching magic pills and
listening to repetitive electronic music."
    - Kristian Wilson, Nintendo, Inc, 1989.


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

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



More information about the crossgcc mailing list