[9991] | 1 | GCC compiler how-to instructions (Revision 3)
|
---|
[9727] | 2 | ===============================================================================
|
---|
[9991] | 3 | Odin libraries now use Gnu Compiler Suite to built some DLL's they require.
|
---|
[9727] | 4 |
|
---|
[9991] | 5 | You will need GNU C/C++ 3.2.1 or later version compilers to build it.
|
---|
| 6 | For current open GCC Compiler Bugs please visit http://xtracker.netlabs.org
|
---|
[9727] | 7 |
|
---|
| 8 |
|
---|
| 9 | To set up EMX for Odin build:
|
---|
| 10 |
|
---|
[9991] | 11 | First get EMX runtime http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxrt.zip
|
---|
| 12 | Add EMX\DLL to your LIBPATH. Be sure to add to PATH emx\bin directory.
|
---|
| 13 | To check that you have all you need type 'emxrev' at your command prompt.
|
---|
[9727] | 14 |
|
---|
| 15 | o GNU Make:
|
---|
| 16 |
|
---|
| 17 | Get it from hobbes and place somewhere in %PATH%
|
---|
| 18 |
|
---|
| 19 | http://hobbes.nmsu.edu/pub/os2/dev/util/make-3_79_2a1-bin.zip
|
---|
| 20 |
|
---|
| 21 | o EMX Development stuff:
|
---|
| 22 |
|
---|
| 23 | http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/bsddev.zip
|
---|
| 24 | http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxdev1.zip
|
---|
| 25 | http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxdev2.zip
|
---|
| 26 | http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/gppdev1.zip
|
---|
| 27 | http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/gppdev2.zip
|
---|
| 28 | http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/gnudev1.zip
|
---|
| 29 | http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/gnudev2.zip
|
---|
| 30 |
|
---|
| 31 | Unzip each of these packages in the directory above EMX. All the extracted
|
---|
| 32 | files will go into the EMX directory after that unzip fix04 over them:
|
---|
| 33 | http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxfix04.zip
|
---|
| 34 |
|
---|
| 35 | Once you have unzipped these packages go to X:\EMX\LIB\ and run OMFLIBS.CMD.
|
---|
| 36 |
|
---|
| 37 | Add three variables to config.sys and reboot:
|
---|
| 38 |
|
---|
[9991] | 39 | set EMX=x:\emx
|
---|
[9727] | 40 | set C_INCLUDE_PATH=x:/emx/include;
|
---|
| 41 | set CPLUS_INCLUDE_PATH=x:/emx/include;
|
---|
| 42 | set LIBRARY_PATH=x:/emx/lib
|
---|
| 43 |
|
---|
| 44 | If you do not want to add them to config.sys add them to newgcc.cmd
|
---|
[9991] | 45 | during GCC 3.2.1 installation phase like this:
|
---|
[9727] | 46 |
|
---|
[9991] | 47 | set EMX=x:\emx
|
---|
[9727] | 48 | set C_INCLUDE_PATH=%EMX_PATH%include;
|
---|
| 49 | set CPLUS_INCLUDE_PATH=%EMX_PATH%include;
|
---|
| 50 | set LIBRARY_PATH=%EMX_PATH%lib
|
---|
| 51 |
|
---|
| 52 | after SET PATH line. Be warned however that all EMX will function correctly
|
---|
[9991] | 53 | only in a window where you've launched newgcc.cmd.
|
---|
[9727] | 54 |
|
---|
[9991] | 55 | !! NEW !!
|
---|
| 56 |
|
---|
| 57 | Note that new Odin build system requires you to setup 'EMX' variable that
|
---|
| 58 | points to EMX path. Note OS/2 slashes used there.
|
---|
| 59 |
|
---|
[9727] | 60 | o GNU Utils
|
---|
| 61 |
|
---|
| 62 | It is necessary to get and install (place in %PATH%) this two packages:
|
---|
| 63 | http://hobbes.nmsu.edu/pub/os2/util/file/gnufutil.zip
|
---|
| 64 | http://hobbes.nmsu.edu/pub/os2/util/file/gnututil.zip
|
---|
| 65 |
|
---|
| 66 | Make sure you placed *.exe files in your %PATH% and .dll files in %LIBPATH%
|
---|
| 67 | so OS/2 can find and launch utils from anywhere.
|
---|
| 68 |
|
---|
[9991] | 69 | o GCC 3.2.1
|
---|
[9727] | 70 |
|
---|
| 71 | Get:
|
---|
| 72 | * binutils-os2-2.11.2-bin.zip
|
---|
| 73 | * emx-strt-fix-0.0.2.zip
|
---|
[9991] | 74 | * gcc-os2-3.2.1-beta-gcc.zip
|
---|
| 75 | * gcc-os2-3.2.1-beta-gpp.zip
|
---|
[9727] | 76 | * gettext-os2-0.10.40-bin.zip
|
---|
| 77 |
|
---|
[9991] | 78 | from ftp://ftp.netlabs.org/incoming/gcc-3.2.1-r2 or later from
|
---|
| 79 | ftp://ftp.netlabs.org/pub/gcc.
|
---|
[9727] | 80 |
|
---|
| 81 | Unzip each of these packages in the directory above EMX. All the extracted
|
---|
| 82 | files will go into the EMX directory.
|
---|
| 83 |
|
---|
| 84 | MAKE SURE YOU DO THIS AFTER YOU INSTALL THE EMX/GCC DEV PACKAGES.
|
---|
| 85 |
|
---|
| 86 | These zips overwrite many of the files from the previous group. Now go
|
---|
| 87 | to x:\emx\include and rename 'cpp' directory to 'cpp-old'.
|
---|
| 88 |
|
---|
| 89 | Go to x:\emx\bin.new and correct newgcc.cmd:
|
---|
| 90 |
|
---|
| 91 | 1. Check EMX_PATH points to correct location of EMX files on your system
|
---|
| 92 | 2. Set WORK_SHELL to suite your needs (File Commander, 4OS2, or simply leave
|
---|
| 93 | as it is for CMD shell)
|
---|
| 94 | 3. Add 'SET GCCLOAD=20' after SET PATH line.
|
---|
| 95 |
|
---|
| 96 | Launch it afterwards.
|
---|
| 97 |
|
---|
[9991] | 98 | Launch gcc -v and check it is 3.2.1
|
---|
[9727] | 99 |
|
---|
| 100 | Do NOT leave window where you've launched newgcc.cmd
|
---|
| 101 |
|
---|
| 102 | 1. Go to X:\EMX\LIB\ and type 'make'.
|
---|
[9991] | 103 | 2. Go to X:\EMX\LIB\GCC-LIB\I386-PC-OS2-EMX\3.2.1\and type 'make'.
|
---|
[9727] | 104 |
|
---|
| 105 | Go to Odin directory and start ConfigureGCC.cmd - this should produce no errors.
|
---|
| 106 | Note that script assumes gcc.exe, g++.exe, as.exe to be in the PATH.
|
---|
| 107 |
|
---|
[9991] | 108 | o Updating from 3.0.3
|
---|
| 109 |
|
---|
| 110 | Before using 3.2.1 please remove 3.0.3 compiler from your system. To do so
|
---|
| 111 | follow this steps:
|
---|
| 112 |
|
---|
| 113 | * Delete x:\emx\lib\gcc-lib\i386-pc-os2_emx
|
---|
| 114 | * Delete x:\emx\include\g++-v3
|
---|
| 115 | * Install 3.2.1 normally and run ConfigureGCC.cmd to check your installation
|
---|
| 116 |
|
---|
| 117 |
|
---|
| 118 |
|
---|