This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Guide for porting from Solaris to Linux
- From: John Love-Jensen <eljay at adobe dot com>
- To: Arijit Mahapatra <ArijitM at catsglobal dot co dot in>, <gcc-help at gcc dot gnu dot org>
- Date: Tue, 04 Mar 2003 06:56:42 -0600
- Subject: Re: Guide for porting from Solaris to Linux
[off topic]
Hi Arijit,
1. Copy the source code over.
2. Compile (with -Wall) each source files, one at a time.
3. Fix the compiler warnings/errors. Repeat #2 until no more
warnings/errors.
4. Run your test suite (if any), and manually test the program.
5. Investigate anomalies, and rectify. Repeat until no more anomalies.
One obstacle is if the program has dependencies that don't exist on the new
platform. That may mean a whole subsystem, such as a library, which was a
third party resource on the earlier platform -- and you've hit a brick wall.
Either rewrite the program to use the facilities on the new platform, or
roll up your sleeves and re-create the subsystem. Or, if you are lucky, you
may be able to port the dependent subsystem over onto the new platform ...
or if it's a Linux/GNU subsystem, chances are somebody has already ported it
and all you need to do is locate it.
The third time you port the same code and run into the same issues all over
again, you'll find yourself tempted to make an abstraction layer. C++ is
really good for making an abstraction layer. Give in to the temptation --
isolating the code from platform dependencies is a Good Thing.
If you are porting Master of Magic, let me know.
Sincerely,
--Eljay