Re: Binary format of compiler
Matthias Blume <[email protected]>
| Newsgroups | gmane.comp.lang.sml.smlnj |
|---|---|
| Message-ID | <[email protected]> |
On Sep 13, 2004, at 3:14 AM, Vesa A Norrman wrote: > Hello, since the latest working version sometimes has bugs, a good way > to install compiler would be: > 1. run config/install.sh > 2. get compiler source > 3. fix bug in source > 4. CMB.make (), makeml, installml > 5. rerun config/install.sh > (Like Matthias said in a message in March.) > The step 5. was necessary to synchronize libraries. Does this mean > that compiling the compiler changes binary format of libraries? > Vesa The short answer is: yes. The longer answer is that it has to do with how persistent stamps (which uniquely identify individual compilation units) are generated. Aside from a hash of the unit's interface, a number of random bits are thrown into the mix to generate each stamp. This is necessary to avoid confusing modules that have identical interfaces. (Otherwise one could subvert abstractions guaranteed by the type system.) Those random bits are cached in the file system to avoid needless recompilations. Unfortunately, the bits are not shipped with the bootfiles, so when you do CMB.make() you end up generating fresh random bits which differ from those that were used when we generated the bootfiles. As a result, all modules appear to change their identity -- which makes it necessary to recompile libraries that depend on them. Matthias ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php