The number
of significantly different CPUs and operating systems used on the desktop today
is much smaller than in the past. The dominance of the x86 architecture means
that most desktop software is never ported to a different CPU. In that same
market, the choice of operating systems has effectively been reduced to three:
Microsoft Windows, OS X, and BSD Unix/Linux. However, in the embedded systems
market, portability remains a significant issue.
International
standards, such as those promulgated by the ISO, greatly facilitate porting by
specifying details of the computing environment in a way that helps reduce
differences between different standards-conforming platforms.
Writing software
that stays within the bounds specified by these standards represents a
practical although nontrivial effort. Porting such a program between two
standards-compliant platforms (such as POSIX.1) can be just a matter of loading
the source code and recompiling it on the new platform. However, practitioners
often find that various minor corrections are required, due to subtle platform
differences. Most standards suffer from "gray areas" where
differences in interpretation of standards lead to small variations from
platform to platform.
There also
exists an ever-increasing number of tools to facilitate porting, such as the
GNU Compiler Collection, which provides consistent programming languages on
different platforms, and Autotools, which automates the detection of minor
variations in the environment and adapts the software accordingly before
compilation.
The
compilers for some high-level programming languages (e.g. Eiffel, Esterel) gain
portability by outputting source code in another high level intermediate
language (such as C) for which compilers for many platforms are generally
available.
Two
activities related to (but distinct from) porting are emulating and
cross-compiling
No comments:
Post a Comment
Don't be shy, leave your comments!