[Mono-list] mcs is self-hosting on Linux

Paolo Molaro lupus@ximian.com
Wed, 13 Mar 2002 12:46:43 +0100


mcs is now self-hosting on linux (you still need to use the GC-enabled
mono interpreter for this build).
A mcs binary compiled on windows was used to compile the cvs sources
of mcs:

mint ~/opt/ximian/mono/mono/mcs.exe -o mcs.exe assign.cs attribute.cs
driver.cs cs-parser.cs cs-tokenizer.cs tree.cs location.cs cfold.cs
class.cs codegen.cs const.cs constant.cs decl.cs delegate.cs enum.cs
ecore.cs expression.cs genericparser.cs interface.cs literal.cs
modifiers.cs namespace.cs parameter.cs report.cs rootcontext.cs
statement.cs statementCollection.cs support.cs typemanager.cs

The created mcs is fully functional and can create a new mcs binary
itself:

mint ./mcs.exe  --target exe -o mcs2.exe assign.cs attribute.cs
driver.cs cs-parser.cs cs-tokenizer.cs tree.cs location.cs cfold.cs
class.cs codegen.cs const.cs constant.cs decl.cs delegate.cs enum.cs
ecore.cs expression.cs genericparser.cs
interface.cs literal.cs modifiers.cs namespace.cs parameter.cs
report.cs rootcontext.cs statement.cs statementCollection.cs support.cs
typemanager.cs

$ ls -l *.exe
-rw-rw-r--    1 lupus    lupus      455268 Mar 13 12:29 mcs2.exe
-rw-rw-r--    1 lupus    lupus      455268 Mar 13 12:19 mcs.exe

And here is the only difference in the two compiled binaries:

$ monodis mcs2.exe >2.il
$ monodis mcs.exe >1.il
$ diff -u 1.il 2.il
--- 1.il        Wed Mar 13 12:30:04 2002
+++ 2.il        Wed Mar 13 12:29:57 2002
@@ -2,7 +2,7 @@
 {
   .ver 0:0:0:0
 }
-.assembly 'mcs'
+.assembly 'mcs2'
 {
   .hash algorithm 0x00008004
   .ver  0:0:0:0 

Happy hacking!

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better