<s>
A	O
cross	B-Application
compiler	I-Application
is	O
a	O
compiler	B-Language
capable	O
of	O
creating	O
executable	B-Application
code	I-Application
for	O
a	O
platform	B-Device
other	O
than	O
the	O
one	O
on	O
which	O
the	O
compiler	B-Language
is	O
running	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
compiler	B-Language
that	O
runs	O
on	O
a	O
PC	B-Device
but	O
generates	O
code	O
that	O
runs	O
on	O
an	O
Android	B-Application
smartphone	B-Application
is	O
a	O
cross	B-Application
compiler	I-Application
.	O
</s>
<s>
A	O
cross	B-Application
compiler	I-Application
is	O
useful	O
to	O
compile	B-Language
code	O
for	O
multiple	B-Operating_System
platforms	I-Operating_System
from	O
one	O
development	O
host	O
.	O
</s>
<s>
Direct	O
compilation	B-Language
on	O
the	O
target	O
platform	B-Device
might	O
be	O
infeasible	O
,	O
for	O
example	O
on	O
embedded	B-Architecture
systems	I-Architecture
with	O
limited	O
computing	O
resources	O
.	O
</s>
<s>
Cross	B-Application
compilers	I-Application
are	O
distinct	O
from	O
source-to-source	B-Language
compilers	I-Language
.	O
</s>
<s>
A	O
cross	B-Application
compiler	I-Application
is	O
for	O
cross-platform	B-Operating_System
software	I-Operating_System
generation	O
of	O
machine	O
code	O
,	O
while	O
a	O
source-to-source	B-Language
compiler	I-Language
translates	O
from	O
one	O
coding	O
language	O
to	O
another	O
in	O
text	O
code	O
.	O
</s>
<s>
Both	O
are	O
programming	B-Application
tools	I-Application
.	O
</s>
<s>
The	O
fundamental	O
use	O
of	O
a	O
cross	B-Application
compiler	I-Application
is	O
to	O
separate	O
the	O
build	O
environment	O
from	O
target	O
environment	O
.	O
</s>
<s>
Embedded	B-Architecture
computers	I-Architecture
where	O
a	O
device	O
has	O
highly	O
limited	O
resources	O
.	O
</s>
<s>
This	O
computer	O
is	O
generally	O
not	O
powerful	O
enough	O
to	O
run	O
a	O
compiler	B-Language
,	O
a	O
file	O
system	O
,	O
or	O
a	O
development	O
environment	O
.	O
</s>
<s>
Compiling	B-Language
for	O
multiple	O
machines	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
company	O
may	O
wish	O
to	O
support	O
several	O
different	O
versions	O
of	O
an	O
operating	B-General_Concept
system	I-General_Concept
or	O
to	O
support	O
several	O
different	O
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
By	O
using	O
a	O
cross	B-Application
compiler	I-Application
,	O
a	O
single	O
build	O
environment	O
can	O
be	O
set	O
up	O
to	O
compile	B-Language
for	O
each	O
of	O
these	O
targets	O
.	O
</s>
<s>
Compiling	B-Language
on	O
a	O
server	B-Operating_System
farm	I-Operating_System
.	O
</s>
<s>
Similar	O
to	O
compiling	B-Language
for	O
multiple	O
machines	O
,	O
a	O
complicated	O
build	O
that	O
involves	O
many	O
compile	B-Language
operations	O
can	O
be	O
executed	O
across	O
any	O
machine	O
that	O
is	O
free	O
,	O
regardless	O
of	O
its	O
underlying	O
hardware	O
or	O
the	O
operating	B-General_Concept
system	I-General_Concept
version	O
that	O
it	O
is	O
running	O
.	O
</s>
<s>
Bootstrapping	B-Application
to	O
a	O
new	O
platform	B-Device
.	O
</s>
<s>
When	O
developing	O
software	O
for	O
a	O
new	O
platform	B-Device
,	O
or	O
the	O
emulator	B-Application
of	O
a	O
future	O
platform	B-Device
,	O
one	O
uses	O
a	O
cross	B-Application
compiler	I-Application
to	O
compile	B-Language
necessary	O
tools	O
such	O
as	O
the	O
operating	B-General_Concept
system	I-General_Concept
and	O
a	O
native	O
compiler	B-Language
.	O
</s>
<s>
Compiling	B-Language
native	O
code	O
for	O
emulators	B-Application
for	O
older	O
now-obsolete	O
platforms	B-Device
like	O
the	O
Commodore	O
64	O
or	O
Apple	B-Device
II	I-Device
by	O
enthusiasts	O
who	O
use	O
cross	B-Application
compilers	I-Application
that	O
run	O
on	O
a	O
current	O
platform	B-Device
(	O
such	O
as	O
Aztec	B-Device
C	I-Device
's	O
MS-DOS	B-Application
6502	B-General_Concept
cross	B-Application
compilers	I-Application
running	O
under	O
Windows	B-Application
XP	I-Application
)	O
.	O
</s>
<s>
Use	O
of	O
virtual	B-Architecture
machines	I-Architecture
(	O
such	O
as	O
Java	O
's	O
JVM	B-Language
)	O
resolves	O
some	O
of	O
the	O
reasons	O
for	O
which	O
cross	B-Application
compilers	I-Application
were	O
developed	O
.	O
</s>
<s>
The	O
virtual	B-Architecture
machine	I-Architecture
paradigm	O
allows	O
the	O
same	O
compiler	B-Language
output	O
to	O
be	O
used	O
across	O
multiple	O
target	O
systems	O
,	O
although	O
this	O
is	O
not	O
always	O
ideal	O
because	O
virtual	B-Architecture
machines	I-Architecture
are	O
often	O
slower	O
and	O
the	O
compiled	B-Language
program	O
can	O
only	O
be	O
run	O
on	O
computers	O
with	O
that	O
virtual	B-Architecture
machine	I-Architecture
.	O
</s>
<s>
coding	O
a	O
program	O
destined	O
for	O
the	O
MIPS	B-Device
architecture	I-Device
on	O
an	O
x86	B-Operating_System
computer	O
)	O
but	O
cross-compilation	B-Application
is	O
also	O
usable	O
when	O
only	O
the	O
operating	B-General_Concept
system	I-General_Concept
environment	O
differs	O
,	O
as	O
when	O
compiling	B-Language
a	O
FreeBSD	B-Operating_System
program	O
under	O
Linux	B-Application
,	O
or	O
even	O
just	O
the	O
system	O
library	O
,	O
as	O
when	O
compiling	B-Language
programs	O
with	O
uClibc	B-Language
on	O
a	O
glibc	B-Language
host	O
.	O
</s>
<s>
The	O
Canadian	B-Application
Cross	I-Application
is	O
a	O
technique	O
for	O
building	O
cross	B-Application
compilers	I-Application
for	O
other	O
machines	O
,	O
where	O
the	O
original	O
machine	O
is	O
much	O
slower	O
or	O
less	O
convenient	O
than	O
the	O
target	O
.	O
</s>
<s>
Given	O
three	O
machines	O
A	O
,	O
B	O
,	O
and	O
C	B-Language
,	O
one	O
uses	O
machine	O
A	O
(	O
e.g.	O
</s>
<s>
running	O
Windows	B-Application
XP	I-Application
on	O
an	O
IA-32	B-Device
processor	O
)	O
to	O
build	O
a	O
cross	B-Application
compiler	I-Application
that	O
runs	O
on	O
machine	O
B	O
(	O
e.g.	O
</s>
<s>
running	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
on	O
an	O
x86-64	B-Device
processor	O
)	O
to	O
create	O
executables	B-Application
for	O
machine	O
C	B-Language
(	O
e.g.	O
</s>
<s>
running	O
Android	B-Application
on	O
an	O
ARM	B-Architecture
processor	I-Architecture
)	O
.	O
</s>
<s>
The	O
practical	O
advantage	O
in	O
this	O
example	O
is	O
that	O
Machine	O
A	O
is	O
slow	O
but	O
has	O
a	O
proprietary	O
compiler	B-Language
,	O
while	O
Machine	O
B	O
is	O
fast	O
but	O
has	O
no	O
compiler	B-Language
at	O
all	O
,	O
and	O
Machine	O
C	B-Language
is	O
impractically	O
slow	O
to	O
be	O
used	O
for	O
compilation	B-Language
.	O
</s>
<s>
The	O
proprietary	O
native	O
Compiler	B-Language
for	O
machine	O
A	O
(	O
1	O
)	O
(	O
e.g.	O
</s>
<s>
compiler	B-Language
from	O
Microsoft	B-Application
Visual	I-Application
Studio	I-Application
)	O
is	O
used	O
to	O
build	O
the	O
gcc	B-Application
native	O
compiler	B-Language
for	O
machine	O
A	O
(	O
2	O
)	O
.	O
</s>
<s>
The	O
end-result	O
cross	B-Application
compiler	I-Application
(	O
4	O
)	O
will	O
not	O
be	O
able	O
to	O
run	O
on	O
build	O
machine	O
A	O
;	O
instead	O
it	O
would	O
run	O
on	O
machine	O
B	O
to	O
compile	B-Language
an	O
application	O
into	O
executable	B-Application
code	I-Application
that	O
would	O
then	O
be	O
copied	O
to	O
machine	O
C	B-Language
and	O
executed	O
on	O
machine	O
C	B-Language
.	O
</s>
<s>
For	O
instance	O
,	O
NetBSD	B-Device
provides	O
a	O
POSIX	O
Unix	B-Application
shell	I-Application
script	O
named	O
build.sh	O
which	O
will	O
first	O
build	O
its	O
own	O
toolchain	B-General_Concept
with	O
the	O
host	O
's	O
compiler	B-Language
;	O
this	O
,	O
in	O
turn	O
,	O
will	O
be	O
used	O
to	O
build	O
the	O
cross	B-Application
compiler	I-Application
which	O
will	O
be	O
used	O
to	O
build	O
the	O
whole	O
system	O
.	O
</s>
<s>
The	O
term	O
Canadian	B-Application
Cross	I-Application
came	O
about	O
because	O
at	O
the	O
time	O
that	O
these	O
issues	O
were	O
under	O
discussion	O
,	O
Canada	O
had	O
three	O
national	O
political	O
parties	O
.	O
</s>
<s>
1979	O
–	O
ALGOL	B-General_Concept
68C	I-General_Concept
generated	O
ZCODE	B-General_Concept
;	O
this	O
aided	O
porting	O
the	O
compiler	B-Language
and	O
other	O
ALGOL	O
68	O
applications	O
to	O
alternate	O
platforms	B-Device
.	O
</s>
<s>
To	O
compile	B-Language
the	O
ALGOL	B-General_Concept
68C	I-General_Concept
compiler	B-Language
required	O
about	O
120KB	O
of	O
memory	O
.	O
</s>
<s>
With	O
Z80	B-General_Concept
its	O
64KB	O
memory	O
is	O
too	O
small	O
to	O
actually	O
compile	B-Language
the	O
compiler	B-Language
.	O
</s>
<s>
So	O
for	O
the	O
Z80	B-General_Concept
the	O
compiler	B-Language
itself	O
had	O
to	O
be	O
cross	O
compiled	B-Language
from	O
the	O
larger	O
CAP	B-Device
capability	I-Device
computer	I-Device
or	O
an	O
IBM	B-Device
System/370	I-Device
mainframe	O
.	O
</s>
<s>
GCC	B-Application
,	O
a	O
free	B-Application
software	I-Application
collection	O
of	O
compilers	B-Language
,	O
can	O
be	O
set	O
up	O
to	O
cross	B-Application
compile	I-Application
.	O
</s>
<s>
It	O
supports	O
many	O
platforms	B-Device
and	O
languages	O
.	O
</s>
<s>
GCC	B-Application
requires	O
that	O
a	O
compiled	B-Language
copy	O
of	O
binutils	B-Application
is	O
available	O
for	O
each	O
targeted	O
platform	B-Device
.	O
</s>
<s>
Especially	O
important	O
is	O
the	O
GNU	B-Application
Assembler	I-Application
.	O
</s>
<s>
Therefore	O
,	O
binutils	B-Application
first	O
has	O
to	O
be	O
compiled	B-Language
correctly	O
with	O
the	O
switch	O
--target	O
=	O
some-target	O
sent	O
to	O
the	O
configure	B-Device
script	I-Device
.	O
</s>
<s>
GCC	B-Application
also	O
has	O
to	O
be	O
configured	B-Device
with	O
the	O
same	O
--target	O
option	O
.	O
</s>
<s>
GCC	B-Application
can	O
then	O
be	O
run	O
normally	O
provided	O
that	O
the	O
tools	O
,	O
which	O
binutils	B-Application
creates	O
,	O
are	O
available	O
in	O
the	O
path	B-Application
,	O
which	O
can	O
be	O
done	O
using	O
the	O
following	O
(	O
on	O
UNIX-like	O
operating	B-General_Concept
systems	I-General_Concept
with	O
bash	O
)	O
:	O
</s>
<s>
Cross-compiling	B-Application
GCC	B-Application
requires	O
that	O
a	O
portion	O
of	O
the	O
target	O
platform'''s	O
C	B-Language
standard	I-Language
library	I-Language
be	O
available	O
on	O
the	O
host	O
platform	B-Device
.	O
</s>
<s>
The	O
programmer	O
may	O
choose	O
to	O
compile	B-Language
the	O
full	O
C	B-Language
library	I-Language
,	O
but	O
this	O
choice	O
could	O
be	O
unreliable	O
.	O
</s>
<s>
The	O
alternative	O
is	O
to	O
use	O
newlib	B-Language
,	O
which	O
is	O
a	O
small	O
C	B-Language
library	I-Language
containing	O
only	O
the	O
most	O
essential	O
components	O
required	O
to	O
compile	B-Language
C	B-Language
source	O
code	O
.	O
</s>
<s>
The	O
GNU	B-Application
autotools	I-Application
packages	O
(	O
i.e.	O
</s>
<s>
autoconf	B-Application
,	O
automake	B-Application
,	O
and	O
libtool	B-Application
)	O
use	O
the	O
notion	O
of	O
a	O
build	O
platform	B-Device
,	O
a	O
host	O
platform	B-Device
,	O
and	O
a	O
target	O
platform	B-Device
.	O
</s>
<s>
The	O
build	O
platform	B-Device
is	O
where	O
the	O
compiler	B-Language
is	O
actually	O
compiled	B-Language
.	O
</s>
<s>
The	O
host	O
platform	B-Device
is	O
always	O
where	O
the	O
output	O
artifacts	O
from	O
the	O
compiler	B-Language
will	O
be	O
executed	O
whether	O
the	O
output	O
is	O
another	O
compiler	B-Language
or	O
not	O
.	O
</s>
<s>
The	O
target	O
platform	B-Device
is	O
used	O
when	O
cross-compiling	B-Application
cross	B-Application
compilers	I-Application
,	O
it	O
represents	O
what	O
type	O
of	O
object	O
code	O
the	O
package	O
will	O
produce	O
;	O
otherwise	O
the	O
target	O
platform	B-Device
setting	O
is	O
irrelevant	O
.	O
</s>
<s>
For	O
example	O
,	O
consider	O
cross-compiling	B-Application
a	O
video	O
game	O
that	O
will	O
run	O
on	O
a	O
Dreamcast	B-Operating_System
.	O
</s>
<s>
The	O
machine	O
where	O
the	O
game	O
is	O
compiled	B-Language
is	O
the	O
build	O
platform	B-Device
while	O
the	B-Operating_System
Dreamcast	I-Operating_System
is	O
the	O
host	O
platform	B-Device
.	O
</s>
<s>
The	O
names	O
host	O
and	O
target	O
are	O
relative	O
to	O
the	O
compiler	B-Language
being	O
used	O
and	O
shifted	O
like	O
son	O
and	O
grandson''	O
.	O
</s>
<s>
Another	O
method	O
popularly	O
used	O
by	O
embedded	O
Linux	B-Application
developers	O
involves	O
the	O
combination	O
of	O
GCC	B-Application
compilers	I-Application
with	O
specialized	O
sandboxes	O
like	O
Scratchbox	O
,	O
scratchbox2	B-Application
,	O
or	O
.	O
</s>
<s>
These	O
tools	O
create	O
a	O
"	O
chrooted	B-Application
"	O
sandbox	O
where	O
the	O
programmer	O
can	O
build	O
up	O
necessary	O
tools	O
,	O
libc	B-Language
,	O
and	O
libraries	O
without	O
having	O
to	O
set	O
extra	O
paths	O
.	O
</s>
<s>
Facilities	O
are	O
also	O
provided	O
to	O
"	O
deceive	O
"	O
the	O
runtime	O
so	O
that	O
it	O
"	O
believes	O
"	O
it	O
is	O
actually	O
running	O
on	O
the	O
intended	O
target	O
CPU	O
(	O
such	O
as	O
an	O
ARM	B-Architecture
architecture	I-Architecture
)	O
;	O
this	O
allows	O
configuration	O
scripts	B-Language
and	O
the	O
like	O
to	O
run	O
without	O
error	O
.	O
</s>
<s>
Scratchbox	O
runs	O
more	O
slowly	O
by	O
comparison	O
to	O
"	O
non-chrooted	O
"	O
methods	O
,	O
and	O
most	O
tools	O
that	O
are	O
on	O
the	O
host	O
must	O
be	O
moved	O
into	O
Scratchbox	O
to	O
function	O
.	O
</s>
<s>
Manx	O
Software	O
Systems	O
,	O
of	O
Shrewsbury	O
,	O
New	O
Jersey	O
,	O
produced	O
C	B-Language
compilers	I-Language
beginning	O
in	O
the	O
1980s	O
targeted	O
at	O
professional	O
developers	O
for	O
a	O
variety	O
of	O
platforms	B-Device
up	O
to	O
and	O
including	O
PCs	B-Device
and	O
Macs	B-Device
.	O
</s>
<s>
Manx	O
's	O
Aztec	B-Device
C	I-Device
programming	B-Language
language	I-Language
was	O
available	O
for	O
a	O
variety	O
of	O
platforms	B-Device
including	O
MS-DOS	B-Application
,	O
Apple	B-Device
II	I-Device
,	O
DOS	B-Operating_System
3.3	I-Operating_System
and	O
ProDOS	B-Operating_System
,	O
Commodore	O
64	O
,	O
Mac	B-Device
68k	O
and	O
Amiga	B-Device
.	O
</s>
<s>
From	O
the	O
1980s	O
and	O
continuing	O
throughout	O
the	O
1990s	O
until	O
Manx	O
Software	O
Systems	O
disappeared	O
,	O
the	O
MS-DOS	B-Application
version	O
of	O
Aztec	B-Device
C	I-Device
was	O
offered	O
both	O
as	O
a	O
native	O
mode	O
compiler	B-Language
or	O
as	O
a	O
cross	B-Application
compiler	I-Application
for	O
other	O
platforms	B-Device
with	O
different	O
processors	O
including	O
the	O
Commodore	O
64	O
and	O
Apple	B-Device
II	I-Device
.	O
</s>
<s>
Internet	O
distributions	O
still	O
exist	O
for	O
Aztec	B-Device
C	I-Device
including	O
their	O
MS-DOS	B-Application
based	O
cross	B-Application
compilers	I-Application
.	O
</s>
<s>
Manx	O
's	O
Aztec	B-Device
C86	I-Device
,	O
their	O
native	O
mode	O
8086	B-General_Concept
MS-DOS	B-Application
compiler	B-Language
,	O
was	O
also	O
a	O
cross	B-Application
compiler	I-Application
.	O
</s>
<s>
Although	O
it	O
did	O
not	O
compile	B-Language
code	O
for	O
a	O
different	O
processor	O
like	O
their	O
Aztec	O
C65	O
6502	B-General_Concept
cross	B-Application
compilers	I-Application
for	O
the	O
Commodore	O
64	O
and	O
Apple	B-Device
II	I-Device
,	O
it	O
created	O
binary	B-Application
executables	I-Application
for	O
then-legacy	O
operating	B-General_Concept
systems	I-General_Concept
for	O
the	O
16-bit	O
8086	B-General_Concept
family	O
of	O
processors	O
.	O
</s>
<s>
When	O
the	O
IBM	B-Device
PC	I-Device
was	O
first	O
introduced	O
it	O
was	O
available	O
with	O
a	O
choice	O
of	O
operating	B-General_Concept
systems	I-General_Concept
,	O
CP/M	B-Operating_System
-86	I-Operating_System
and	O
PC	B-Device
DOS	O
being	O
two	O
of	O
them	O
.	O
</s>
<s>
Aztec	B-Device
C86	I-Device
was	O
provided	O
with	O
link	O
libraries	O
for	O
generating	O
code	O
for	O
both	O
IBM	B-Device
PC	I-Device
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
Throughout	O
the	O
1980s	O
later	O
versions	O
of	O
Aztec	B-Device
C86	I-Device
(	O
3.xx	O
,	O
4.xx	O
and	O
5.xx	O
)	O
added	O
support	O
for	O
MS-DOS	B-Application
"	O
transitory	O
"	O
versions	O
1	O
and	O
2	O
and	O
which	O
were	O
less	O
robust	O
than	O
the	O
"	O
baseline	O
"	O
MS-DOS	B-Application
version	O
3	O
and	O
later	O
which	O
Aztec	B-Device
C86	I-Device
targeted	O
until	O
its	O
demise	O
.	O
</s>
<s>
Finally	O
,	O
Aztec	B-Device
C86	I-Device
provided	O
C	B-Language
language	I-Language
developers	O
with	O
the	O
ability	O
to	O
produce	O
ROM-able	B-General_Concept
"	O
HEX	O
"	O
code	O
which	O
could	O
then	O
be	O
transferred	O
using	O
a	O
ROM	B-Device
burner	I-Device
directly	O
to	O
an	O
8086	B-General_Concept
based	O
processor	O
.	O
</s>
<s>
Paravirtualization	O
may	O
be	O
more	O
common	O
today	O
but	O
the	O
practice	O
of	O
creating	O
low-level	O
ROM	B-Device
code	O
was	O
more	O
common	O
per-capita	O
during	O
those	O
years	O
when	O
device	B-Application
driver	I-Application
development	O
was	O
often	O
done	O
by	O
application	O
programmers	O
for	O
individual	O
applications	O
,	O
and	O
new	O
devices	O
amounted	O
to	O
a	O
cottage	O
industry	O
.	O
</s>
<s>
This	O
practice	O
was	O
similar	O
to	O
Embedded	B-Architecture
Systems	I-Architecture
Development	I-Architecture
today	O
.	O
</s>
<s>
Thomas	O
Fenwick	O
and	O
James	O
Goodnow	O
II	O
were	O
the	O
two	O
principal	O
developers	O
of	O
Aztec-C	B-Device
.	O
Fenwick	O
later	O
became	O
notable	O
as	O
the	O
author	O
of	O
the	O
Microsoft	B-Operating_System
Windows	I-Operating_System
CE	I-Operating_System
kernel	B-Operating_System
or	O
NK	O
(	O
"	O
New	O
Kernel	B-Operating_System
"	O
)	O
as	O
it	O
was	O
then	O
called	O
.	O
</s>
<s>
Microsoft	O
C	B-Language
(	O
MSC	O
)	O
has	O
a	O
shorter	O
history	O
than	O
others	O
dating	O
back	O
to	O
the	O
1980s	O
.	O
</s>
<s>
The	O
first	O
Microsoft	O
C	B-Language
Compilers	I-Language
were	O
made	O
by	O
the	O
same	O
company	O
who	O
made	O
Lattice	B-Device
C	I-Device
and	O
were	O
rebranded	O
by	O
Microsoft	O
as	O
their	O
own	O
,	O
until	O
MSC	O
4	O
was	O
released	O
,	O
which	O
was	O
the	O
first	O
version	O
that	O
Microsoft	O
produced	O
themselves	O
.	O
</s>
<s>
In	O
1987	O
,	O
many	O
developers	O
started	O
switching	O
to	O
Microsoft	O
C	B-Language
,	O
and	O
many	O
more	O
would	O
follow	O
throughout	O
the	O
development	O
of	O
Microsoft	B-Application
Windows	I-Application
to	O
its	O
present	O
state	O
.	O
</s>
<s>
Products	O
like	O
Clipper	B-Application
and	O
later	O
Clarion	B-Language
emerged	O
that	O
offered	O
easy	O
database	O
application	O
development	O
by	O
using	O
cross	O
language	O
techniques	O
,	O
allowing	O
part	O
of	O
their	O
programs	O
to	O
be	O
compiled	B-Language
with	O
Microsoft	O
C	B-Language
.	O
</s>
<s>
Borland	O
C	B-Language
(	O
California	O
company	O
)	O
was	O
available	O
for	O
purchase	O
years	O
before	O
Microsoft	O
released	O
its	O
first	O
C	B-Language
product	O
.	O
</s>
<s>
Long	O
before	O
Borland	O
,	O
BSD	O
Unix	O
(	O
Berkeley	O
University	O
)	O
had	O
gotten	O
C	B-Language
from	O
the	O
authors	O
of	O
the	O
C	B-Language
language	I-Language
:	O
Kernighan	O
and	O
Ritchie	O
who	O
wrote	O
it	O
in	O
unison	O
while	O
working	O
for	O
AT&T	O
(	O
labs	O
)	O
.	O
</s>
<s>
R	O
's	O
original	O
needs	O
was	O
not	O
only	O
elegant	O
2nd	O
level	O
parsed	O
syntax	O
to	O
replace	O
asm	O
1st	O
level	O
parsed	O
syntax	O
:	O
it	O
was	O
designed	O
so	O
that	O
a	O
minimal	O
amount	O
of	O
asm	O
be	O
written	O
to	O
support	O
each	O
platform	B-Device
(	O
the	O
original	O
design	O
of	O
C	B-Language
was	O
ability	O
to	O
cross	B-Application
compile	I-Application
using	O
C	B-Language
with	O
the	O
least	O
support	O
code	O
per	O
platform	B-Device
,	O
which	O
they	O
needed	O
.	O
)	O
.	O
</s>
<s>
Also	O
yesterdays	O
C	B-Language
directly	O
related	O
to	O
ASM	O
code	O
wherever	O
not	O
platform	B-Operating_System
dependent	I-Operating_System
.	O
</s>
<s>
Today	O
's	O
C	B-Language
(	O
more-so	O
c++	O
)	O
is	O
no	O
longer	O
C	B-Language
compatible	O
and	O
the	O
asm	O
code	O
underlying	O
can	O
be	O
extremely	O
different	O
than	O
written	O
on	O
a	O
given	O
platform	B-Device
(	O
in	O
Linux	B-Application
:	O
it	O
sometimes	O
replaces	O
and	O
detours	O
library	O
calls	O
with	O
distributor	O
choices	O
)	O
.	O
</s>
<s>
Today	O
's	O
C	B-Language
is	O
a	O
3rd	O
or	O
4th	O
level	O
language	O
which	O
is	O
used	O
the	O
old	O
way	O
like	O
a	O
2nd	O
level	O
language	O
.	O
</s>
<s>
C	B-Language
programs	I-Language
had	O
long	O
been	O
linked	O
with	O
modules	O
written	O
in	O
assembly	B-Language
language	I-Language
.	O
</s>
<s>
Most	O
C	B-Language
compilers	I-Language
(	O
even	O
current	O
compilers	B-Language
)	O
offer	O
an	O
assembly	B-Language
language	I-Language
pass	O
(	O
that	O
can	O
be	O
tweaked	O
for	O
efficiency	O
then	O
linked	O
to	O
the	O
rest	O
of	O
the	O
program	O
after	O
assembling	O
)	O
.	O
</s>
<s>
Compilers	B-Language
like	O
Aztec-C	B-Device
converted	O
everything	O
to	O
assembly	B-Language
language	I-Language
as	O
a	O
distinct	O
pass	O
and	O
then	O
assembled	O
the	O
code	O
in	O
a	O
distinct	O
pass	O
,	O
and	O
were	O
noted	O
for	O
their	O
very	O
efficient	O
and	O
small	O
code	O
,	O
but	O
by	O
1987	O
the	O
optimizer	O
built	O
into	O
Microsoft	O
C	B-Language
was	O
very	O
good	O
,	O
and	O
only	O
"	O
mission	O
critical	O
"	O
parts	O
of	O
a	O
program	O
were	O
usually	O
considered	O
for	O
rewriting	O
.	O
</s>
<s>
In	O
fact	O
,	O
C	B-Language
language	I-Language
programming	O
had	O
taken	O
over	O
as	O
the	O
"	O
lowest-level	O
"	O
language	O
,	O
with	O
programming	O
becoming	O
a	O
multi-disciplinary	O
growth	O
industry	O
and	O
projects	O
becoming	O
larger	O
,	O
with	O
programmers	O
writing	O
user	O
interfaces	O
and	O
database	O
interfaces	O
in	O
higher-level	O
languages	O
,	O
and	O
a	O
need	O
had	O
emerged	O
for	O
cross	O
language	O
development	O
that	O
continues	O
to	O
this	O
day	O
.	O
</s>
<s>
By	O
1987	O
,	O
with	O
the	O
release	O
of	O
MSC	O
5.1	O
,	O
Microsoft	O
offered	O
a	O
cross	O
language	O
development	O
environment	O
for	O
MS-DOS	B-Application
.	O
</s>
<s>
16-bit	O
binary	O
object	O
code	O
written	O
in	O
assembly	B-Language
language	I-Language
(	O
MASM	B-Application
)	O
and	O
Microsoft	O
's	O
other	O
languages	O
including	O
QuickBASIC	B-Language
,	O
Pascal	B-Application
,	O
and	O
Fortran	B-Application
could	O
be	O
linked	O
together	O
into	O
one	O
program	O
,	O
in	O
a	O
process	O
they	O
called	O
"	O
Mixed	O
Language	O
Programming	O
"	O
and	O
now	O
"	O
InterLanguage	O
Calling	O
"	O
.	O
</s>
<s>
If	O
BASIC	O
was	O
used	O
in	O
this	O
mix	O
,	O
the	O
main	O
program	O
needed	O
to	O
be	O
in	O
BASIC	O
to	O
support	O
the	O
internal	O
runtime	B-Device
system	I-Device
that	O
compiled	B-Language
BASIC	O
required	O
for	O
garbage	O
collection	O
and	O
its	O
other	O
managed	O
operations	O
that	O
simulated	O
a	O
BASIC	O
interpreter	B-Application
like	O
QBasic	B-Language
in	O
MS-DOS	B-Application
.	O
</s>
<s>
The	O
calling	O
convention	O
for	O
C	B-Language
code	O
,	O
in	O
particular	O
,	O
was	O
to	O
pass	O
parameters	O
in	O
"	O
reverse	O
order	O
"	O
on	O
the	O
stack	B-General_Concept
and	O
return	O
values	O
on	O
the	O
stack	B-General_Concept
rather	O
than	O
in	O
a	O
processor	B-General_Concept
register	I-General_Concept
.	O
</s>
<s>
There	O
were	O
other	O
programming	O
rules	O
to	O
make	O
all	O
the	O
languages	O
work	O
together	O
,	O
but	O
this	O
particular	O
rule	O
persisted	O
through	O
the	O
cross	O
language	O
development	O
that	O
continued	O
throughout	O
Windows	B-Application
16	O
-	O
and	O
32-bit	O
versions	O
and	O
in	O
the	O
development	O
of	O
programs	O
for	O
OS/2	B-Application
,	O
and	O
which	O
persists	O
to	O
this	O
day	O
.	O
</s>
<s>
It	O
is	O
known	O
as	O
the	O
Pascal	B-Application
calling	O
convention	O
.	O
</s>
<s>
Another	O
type	O
of	O
cross	B-Application
compilation	I-Application
that	O
Microsoft	O
C	B-Language
was	O
used	O
for	O
during	O
this	O
time	O
was	O
in	O
retail	O
applications	O
that	O
require	O
handheld	B-Application
devices	I-Application
like	O
the	O
Symbol	O
Technologies	O
PDT3100	O
(	O
used	O
to	O
take	O
inventory	O
)	O
,	O
which	O
provided	O
a	O
link	O
library	O
targeted	O
at	O
an	O
8088	B-Device
based	O
barcode	B-Device
reader	I-Device
.	O
</s>
<s>
The	O
application	O
was	O
built	O
on	O
the	O
host	O
computer	O
then	O
transferred	O
to	O
the	O
handheld	B-Application
device	I-Application
(	O
via	O
a	O
serial	O
cable	O
)	O
where	O
it	O
was	O
run	O
,	O
similar	O
to	O
what	O
is	O
done	O
today	O
for	O
that	O
same	O
market	O
using	O
Windows	B-Operating_System
Mobile	I-Operating_System
by	O
companies	O
like	O
Motorola	O
,	O
who	O
bought	O
Symbol	O
.	O
</s>
<s>
Throughout	O
the	O
1990s	O
and	O
beginning	O
with	O
MSC	O
6	O
(	O
their	O
first	O
ANSI	O
C	B-Language
compliant	O
compiler	B-Language
)	O
Microsoft	O
re-focused	O
their	O
C	B-Language
compilers	I-Language
on	O
the	O
emerging	O
Windows	B-Application
market	O
,	O
and	O
also	O
on	O
OS/2	B-Application
and	O
in	O
the	O
development	O
of	O
GUI	B-Application
programs	O
.	O
</s>
<s>
Mixed	O
language	O
compatibility	O
remained	O
through	O
MSC	O
6	O
on	O
the	O
MS-DOS	B-Application
side	O
,	O
but	O
the	O
API	B-Application
for	O
Microsoft	B-Application
Windows	I-Application
3.0	O
and	O
3.1	O
was	O
written	O
in	O
MSC	O
6	O
.	O
</s>
<s>
MSC	O
6	O
was	O
also	O
extended	O
to	O
provide	O
support	O
for	O
32-bit	O
assemblies	O
and	O
support	O
for	O
the	O
emerging	O
Windows	B-Application
for	O
Workgroups	O
and	O
Windows	B-Device
NT	I-Device
which	O
would	O
form	O
the	O
foundation	O
for	O
Windows	B-Application
XP	I-Application
.	O
</s>
<s>
A	O
programming	O
practice	O
called	O
a	O
thunk	B-Application
was	O
introduced	O
to	O
allow	O
passing	O
between	O
16	O
-	O
and	O
32-bit	O
programs	O
that	O
took	O
advantage	O
of	O
runtime	O
binding	O
(	O
dynamic	B-Application
linking	I-Application
)	O
rather	O
than	O
the	O
static	O
binding	O
that	O
was	O
favoured	O
in	O
monolithic	B-Architecture
16-bit	O
MS-DOS	B-Application
applications	O
.	O
</s>
<s>
MS-DOS	B-Application
support	O
was	O
still	O
provided	O
with	O
the	O
release	O
of	O
Microsoft	O
's	O
first	O
C++	O
Compiler	B-Language
,	O
MSC	O
7	O
,	O
which	O
was	O
backwardly	O
compatible	O
with	O
the	O
C	B-Language
programming	I-Language
language	I-Language
and	O
MS-DOS	B-Application
and	O
supported	O
both	O
16	O
-	O
and	O
32-bit	O
code	O
generation	O
.	O
</s>
<s>
MSC	O
took	O
over	O
where	O
Aztec	B-Device
C86	I-Device
left	O
off	O
.	O
</s>
<s>
The	O
market	O
share	O
for	O
C	B-Language
compilers	I-Language
had	O
turned	O
to	O
cross	B-Application
compilers	I-Application
which	O
took	O
advantage	O
of	O
the	O
latest	O
and	O
greatest	O
Windows	B-Application
features	O
,	O
offered	O
C	B-Language
and	O
C++	O
in	O
a	O
single	O
bundle	O
,	O
and	O
still	O
supported	O
MS-DOS	B-Application
systems	O
that	O
were	O
already	O
a	O
decade	O
old	O
,	O
and	O
the	O
smaller	O
companies	O
that	O
produced	O
compilers	B-Language
like	O
Aztec	B-Device
C	I-Device
could	O
no	O
longer	O
compete	O
and	O
either	O
turned	O
to	O
niche	O
markets	O
like	O
embedded	B-Architecture
systems	I-Architecture
or	O
disappeared	O
.	O
</s>
<s>
MS-DOS	B-Application
and	O
16-bit	O
code	O
generation	O
support	O
continued	O
until	O
MSC	O
8.00c	O
which	O
was	O
bundled	O
with	O
Microsoft	O
C++	O
and	O
Microsoft	O
Application	O
Studio	O
1.5	O
,	O
the	O
forerunner	O
of	O
Microsoft	B-Application
Visual	I-Application
Studio	I-Application
which	O
is	O
the	O
cross	B-Application
development	I-Application
environment	O
that	O
Microsoft	O
provide	O
today	O
.	O
</s>
<s>
MSC	O
12	O
was	O
released	O
with	O
Microsoft	B-Application
Visual	I-Application
Studio	I-Application
6	O
and	O
no	O
longer	O
provided	O
support	O
for	O
MS-DOS	B-Application
16-bit	O
binaries	O
,	O
instead	O
providing	O
support	O
for	O
32-bit	O
console	O
applications	O
,	O
but	O
provided	O
support	O
for	O
Windows	B-Application
95	I-Application
and	O
Windows	B-Device
98	I-Device
code	O
generation	O
as	O
well	O
as	O
for	O
Windows	B-Device
NT	I-Device
.	O
</s>
<s>
Link	O
libraries	O
were	O
available	O
for	O
other	O
processors	O
that	O
ran	O
Microsoft	B-Application
Windows	I-Application
;	O
a	O
practice	O
that	O
Microsoft	O
continues	O
to	O
this	O
day	O
.	O
</s>
<s>
MSC	O
13	O
was	O
released	O
with	O
Visual	B-Application
Studio	I-Application
2003	O
,	O
and	O
MSC	O
14	O
was	O
released	O
with	O
Visual	B-Application
Studio	I-Application
2005	O
,	O
both	O
of	O
which	O
still	O
produce	O
code	O
for	O
older	O
systems	O
like	O
Windows	B-Application
95	I-Application
,	O
but	O
which	O
will	O
produce	O
code	O
for	O
several	O
target	O
platforms	B-Device
including	O
the	O
mobile	O
market	O
and	O
the	O
ARM	B-Architecture
architecture	I-Architecture
.	O
</s>
<s>
In	O
2001	O
Microsoft	O
developed	O
the	O
Common	O
Language	O
Runtime	O
(	O
CLR	O
)	O
,	O
which	O
formed	O
the	O
core	O
for	O
their	O
.NET	B-Application
Framework	I-Application
compiler	B-Language
in	O
the	O
Visual	B-Application
Studio	I-Application
IDE	O
.	O
</s>
<s>
This	O
layer	O
on	O
the	O
operating	B-General_Concept
system	I-General_Concept
which	O
is	O
in	O
the	O
API	B-Application
allows	O
the	O
mixing	O
of	O
development	O
languages	O
compiled	B-Language
across	O
platforms	B-Device
that	O
run	O
the	O
Windows	B-Application
operating	I-Application
system	I-Application
.	O
</s>
<s>
The	O
.NET	B-Application
Framework	I-Application
runtime	O
and	O
CLR	O
provide	O
a	O
mapping	O
layer	O
to	O
the	O
core	O
routines	O
for	O
the	O
processor	O
and	O
the	O
devices	O
on	O
the	O
target	O
computer	O
.	O
</s>
<s>
The	O
command-line	O
C	B-Language
compiler	B-Language
in	O
Visual	B-Application
Studio	I-Application
will	O
compile	B-Language
native	O
code	O
for	O
a	O
variety	O
of	O
processors	O
and	O
can	O
be	O
used	O
to	O
build	O
the	O
core	O
routines	O
themselves	O
.	O
</s>
<s>
Microsoft	O
.NET	B-Application
applications	O
for	O
target	O
platforms	B-Device
like	O
Windows	B-Operating_System
Mobile	I-Operating_System
on	O
the	O
ARM	B-Architecture
architecture	I-Architecture
cross-compile	B-Application
on	O
Windows	B-Application
machines	O
with	O
a	O
variety	O
of	O
processors	O
and	O
Microsoft	O
also	O
offer	O
emulators	B-Application
and	O
remote	O
deployment	O
environments	O
that	O
require	O
very	O
little	O
configuration	O
,	O
unlike	O
the	O
cross	B-Application
compilers	I-Application
in	O
days	O
gone	O
by	O
or	O
on	O
other	O
platforms	B-Device
.	O
</s>
<s>
Runtime	O
libraries	O
,	O
such	O
as	O
Mono	B-Application
,	O
provide	O
compatibility	O
for	O
cross-compiled	O
.NET	B-Application
programs	O
to	O
other	O
operating	B-General_Concept
systems	I-General_Concept
,	O
such	O
as	O
Linux	B-Application
.	O
</s>
<s>
Libraries	O
like	O
Qt	B-Language
and	O
its	O
predecessors	O
including	O
XVT	B-Library
provide	O
source	O
code	O
level	O
cross	B-Application
development	I-Application
capability	O
with	O
other	O
platforms	B-Device
,	O
while	O
still	O
using	O
Microsoft	O
C	B-Language
to	O
build	O
the	O
Windows	B-Application
versions	O
.	O
</s>
<s>
Other	O
compilers	B-Language
like	O
MinGW	B-Application
have	O
also	O
become	O
popular	O
in	O
this	O
area	O
since	O
they	O
are	O
more	O
directly	O
compatible	O
with	O
the	O
Unixes	O
that	O
comprise	O
the	O
non-Windows	O
side	O
of	O
software	O
development	O
allowing	O
those	O
developers	O
to	O
target	O
all	O
platforms	B-Device
using	O
a	O
familiar	O
build	O
environment	O
.	O
</s>
<s>
Free	B-Operating_System
Pascal	I-Operating_System
was	O
developed	O
from	O
the	O
beginning	O
as	O
a	O
cross	B-Application
compiler	I-Application
.	O
</s>
<s>
The	O
compiler	B-Language
executable	B-Application
(	O
ppcXXX	O
where	O
XXX	O
is	O
a	O
target	O
architecture	O
)	O
is	O
capable	O
of	O
producing	O
executables	B-Application
(	O
or	O
just	O
object	O
files	O
if	O
no	O
internal	O
linker	O
exists	O
,	O
or	O
even	O
just	O
assembly	B-Language
files	I-Language
if	O
no	O
internal	O
assembler	B-Language
exists	O
)	O
for	O
all	O
OS	O
of	O
the	O
same	O
architecture	O
.	O
</s>
<s>
For	O
example	O
,	O
ppc386	O
is	O
capable	O
of	O
producing	O
executables	B-Application
for	O
i386-linux	O
,	O
i386-win32	O
,	O
i386-go32v2	O
(	O
DOS	O
)	O
and	O
all	O
other	O
OSes	O
(	O
see	O
)	O
.	O
</s>
<s>
For	O
compiling	B-Language
to	O
another	O
architecture	O
,	O
however	O
,	O
a	O
cross	O
architecture	O
version	O
of	O
the	O
compiler	B-Language
must	O
be	O
built	O
first	O
.	O
</s>
<s>
The	O
resulting	O
compiler	B-Language
executable	B-Application
would	O
have	O
additional	O
'	O
ross	O
 '	O
before	O
the	O
target	O
architecture	O
in	O
its	O
name	O
.	O
</s>
<s>
if	O
the	O
compiler	B-Language
is	O
built	O
to	O
target	O
x64	B-Device
,	O
then	O
the	O
executable	B-Application
would	O
be	O
ppcrossx64	O
.	O
</s>
<s>
To	O
compile	B-Language
for	O
a	O
chosen	O
architecture-OS	O
,	O
the	O
compiler	B-Language
switch	O
(	O
for	O
the	O
compiler	B-Language
driver	O
fpc	O
)	O
-P	O
and	O
-T	O
can	O
be	O
used	O
.	O
</s>
<s>
This	O
is	O
also	O
done	O
when	O
cross-compiling	B-Application
the	O
compiler	B-Language
itself	O
,	O
but	O
is	O
set	O
via	O
make	O
option	O
CPU_TARGET	O
and	O
OS_TARGET	O
.	O
</s>
<s>
GNU	B-Application
assembler	I-Application
and	O
linker	O
for	O
the	O
target	O
platform	B-Device
is	O
required	O
if	O
Free	B-Operating_System
Pascal	I-Operating_System
does	O
not	O
yet	O
have	O
internal	O
version	O
of	O
the	O
tools	O
for	O
the	O
target	O
platform	B-Device
.	O
</s>
<s>
Clang	O
is	O
natively	O
a	O
cross	B-Application
compiler	I-Application
,	O
at	O
build	O
time	O
you	O
can	O
select	O
which	O
architectures	O
you	O
want	O
Clang	O
to	O
be	O
able	O
to	O
target	O
.	O
</s>
