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