This is the mail archive of the
crossgcc@cygnus.com
mailing list for the crossgcc project.
Re: New target architecture
- To: crossgcc@cygnus.com
- Subject: Re: New target architecture
- From: Ken Rose <rose@netcom.com>
- Date: Wed, 7 Jul 1999 09:40:52 -0700 (PDT)
- Reply-To: crossgcc@cygnus.com
>I know it is not a common request, but what I need to do is target GCC
>at a new processor architecture. I have looked in the places that are
>obvious to me and have not found any documentation that talks about
>retargeting the gnu tools to a new architecture. Before I start
>trying to figure it out by reading the files, I thought I would ask if
>anybody has any references to documentation on this process.
The GCC manual has about 200 pages on the subject. It does suffer
from being written by people who know intimately how it works, and
is therefore not so much a primer as a reminder for the already initiated.
There is a paper at
ftp://ftp.axis.se/pub/users/hp/pgccfd/pgccfd.{ps,pdf}
That's a sort of "how I did it" document.
From my own experience at porting to a new architecture, you should
start by trying to understand the port to some architecture that you
know well. When it mostly makes sense, find a machine that resembles
your target architecture, look it over to generally understand how
the quirks work, and then hack it up to generate code for your own
machine. Generally, you can use pieces from several existing ports
to get the general features you need. You'll need to modify everything,
of course, but many of the pieces are already implemented for some
processor, somewhere.
If you'd like more detailed "war stories", you can contact me directly.
Ken Rose
<rose@acm.org>
~
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.