Thursday, June 27, 2002

http://www.linux-mag.com/2001-04/GCC_net_02.html Modifying GCC to Support .NET
When we talk about GCC supporting .NET, there are several different things we could mean. We could mean that GCC would emit .NET IL (Intermediate Language) for any of the source languages that it can process. Then you could take your C program, compile it with G and obtain .NET IL. The resulting program could then be run on any system that supports .NET.
Another thing that we might mean is that GCC could process the .NET IL as input and emit machine code. In this case, you could take .NET IL generated by any .NET compiler and compile it to run on any system supported by GCC. For example, you might use Microsoft's C# compiler to generate .NET IL and then use GCC to transform the .NET IL into x86 code that could run under GNU/Linux.
The last thing we might mean is that GCC could accept the C# source language proposed by Microsoft. This language is specifically designed to target .NET. C# is Microsoft's language of choice for .NET even though .NET specifically supports multiple source languages. In this alternative, GCC could accept a C# program as input and, say, compile it to run under Solaris.
The first alternative (i.e., generating .NET IL) corresponds to writing a new "backend" for GCC. In many ways, .NET IL isn't very different from the assembly code used for any other processor, so generating .NET IL is analogous to porting GCC to the latest microprocessor. The other two alternatives correspond to

0 Comments:

Post a Comment

<< Home