[M3devel] instructions for how to bring up a working NT386GNU toolset today

Jay jayk123 at hotmail.com
Mon Feb 18 05:03:23 CET 2008


 This email has whitespace at the start/end of most lines
   in an attempt to preserve its formating. 

  I already had cm3cg, and it is slow to rebuild. 
  These instructions omit building that, but it is just build and ship in m3-sys\m3cc.   
  Building m3cc does require a fair bit of Cygwin installed. 
  Including but not limited to gcc, binutils, sed, make, awk. 

  copy \cm3\bin\cm3cg.exe C:\cm3-min-WIN32-NT386-5.1.8\bin  
  rmdir /q/s \cm3  
  xcopy /fivery C:\cm3-min-WIN32-NT386-5.1.8 c:\cm3  

  Older than 5.1.8 will not work.  

  Setup a cm3/NT386 build environment, for example: 

  set CM3_GCC_BACKEND=no 
  set CM3_INSTALL=c:\cm3 
  set CM3_OSTYPE=WIN32 
  set CM3_ROOT=c:\dev2\cm3.2 
  set CM3_TARGET=NT386 
  set M3CONFIG=c:\dev2\cm3.2\m3-sys\cminstall\src\config\NT386  

  Almost none of these are needed, as they are probed for quite  
  successfully. However this is what I am testing right now.   
  Make sure Cygwin link.exe is not in %PATH%.   
  I just delete it.  
    del \cygwin\bin\link.exe  

  I do actually have Cygwin always on my path, so there might be
    hidden dependencies on that.

  type \AUTOEXEC.BAT  
    set CVS_RSH=ssh 
    PATH %SystemDrive%\cygwin\bin;%PATH%  

  There are also presently problems with slashes, such that managing M3CONFIG  
  manually is a good idea for now. 

  cd /d %cm3_root%\scripts\python  
  .\do-cm3-all.py realclean    
  .\upgrade.py   

  In another cmd window, setup a CM3/NT386GNU environment, for example:  

  set CM3_GCC_BACKEND=yes  
  set CM3_INSTALL=/cm3  
  set CM3_OSTYPE=POSIX  
  set CM3_ROOT=/dev2/cm3.2  
  set CM3_TARGET=NT386  
  set M3CONFIG=/dev2/cm3.2/m3-sys/cminstall/src/config/NT386GNU  
  set OMIT_GCC=yes  

  Again, this is largely redundant, but ok.  
  What is most important is that CM3_OSTYPE=POSIX or that Cygwin uname is in the path. 
    (Work is needed to cleanup this area that I have muddied over the past few months,
     including teaching cm3 that forward slashes work on Win32, except that won't
     help bootstrapping from 5.1.8)  

  Also NOTE that I have symlinks setup for these paths to be correct:  

  ls -l / 
  lrwxrwxrwx   1 Jay None    11 Feb 10 01:10 c -> /cygdrive/c 
  lrwxrwxrwx   1 Jay None     6 Feb 10 21:39 cm3 -> /c/cm3 
  lrwxrwxrwx   1 Jay None     7 Feb 10 01:10 dev2 -> /c/dev2  

  /cygdrive is long and ugly. 

  .\do-cm3-all.py realclean 

  Back in the NT386 environment:  

  Point at the NT386GNU configuration file: 
    set M3CONFIG=c:\dev2\cm3.2\m3-sys\cminstall\src\config\NT386GNU   

  Build the minimum NT386GNU system using the NT386 host compiler: 
    .\bootntgnu.py  

  and then restore the configuration to "normal":  
    set M3CONFIG=c:\dev2\cm3.2\m3-sys\cminstall\src\config\NT386  

 (Yeah yeah, to clean step should work here.)

  Back in the NT386GNU environment:  
    .\install-cm3-compiler.py 
    .\upgrade.py  

  Done.  

  Next step is to try make-dist.py. (It doesn't work.) 

  Also note that do-cm3-std gets much further than these steps.  
  But these are just to start and get your own "min" system.   
  A crash in m3bundle needs investigation if is still happens.  
  Lots of GUI stuff does build but I haven't tried running it yet. 

  Also NOTE that the integrated backend should be viable for targeting
    the Cygwin runtime, and this will build MUCH faster. 

  Of course, you must have current source for this to work. 

  I have not yet run the tests, sorry Olaf. 

  Anyone want to try this and report back how it goes? Please? 

 - Jay 
_________________________________________________________________
Need to know the score, the latest news, or you need your Hotmail®-get your "fix".
http://www.msnmobilefix.com/Default.aspx


More information about the M3devel mailing list