This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: porting GNU development tools using CGEN
- To: Johan Rydberg <johan dot rydberg at netinsight dot se>
- Subject: Re: porting GNU development tools using CGEN
- From: Greg McGary <greg at mcgary dot org>
- Date: 04 Dec 2000 12:18:17 -0700
- Cc: cgen at sources dot redhat dot com
- References: <3A2BB658.99192BA1@netinsight.se>
Johan Rydberg <johan.rydberg@netinsight.se> writes:
> Since I have started porting the GNU development tools using CGEN
> I have decided to write a small document describing the steps that
> you have to go through to do this.
I have been doing the same thing, so will be happy to review and/or
contribute my bit. FYI, here's my one-paragraph porting guide:
Find all instances of the string "fr30" (case insensitive)
then clone & adapt appropriately. (I have preferred fr30 over
m32r because my new CPU matches fr30 for simplicity, whereas
m32r is more complex as it comprises multiple models.) When
you first clone a file or significant bit of code for the sole
purpose of getting things to compile, immediately attach a
FIXME comment stating that all you've done so far is clone.
Revisit all cloned code and either adapt it or remove it if
it's inapplicable to the new CPU. You must make all cloned
code your own, which is to say, you must understand it as
completely as if you had written it from first principles.
You do a disservice to those who come after if you leave
unused or inappropriate cloned junk laying about.
Greg