Guide for porting from Solaris to Linux
John Love-Jensen
eljay@adobe.com
Tue Mar 4 13:03:00 GMT 2003
[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
More information about the Gcc-help
mailing list