home *** CD-ROM | disk | FTP | other *** search
- ===============================================================================
- build.doc emx 0.8f BUILDING GCC etc. 03-Jan-1993
- ===============================================================================
-
- Building GCC, GDB and utilities
- ===============================
-
- Note: Some of the makefiles currently assume that a FAT file system is
- used. (NMAKE doesn't support long file names.) GCC can also be built
- on an HPFS partition (the file names are truncated by gcc-emx.cmd).
-
- The makefiles have been created for NMAKE. dmake and GNU make work as
- well. Use the initialization file /emx/etc/dmake.ini for dmake.
-
- Set the following environment variables (insert the correct drive
- letters):
-
- set emxopt=-t Truncate file names to 8.3
- set emx=c:\emx\emx.exe Speed up locating emx.exe for MS-DOS
- path c:\emx\bin;%path% Search c:\emx\bin for programs
-
- You need the patched sources. omake is a batch file, contained in
- /emx/bin. It calls NMAKE and redirects output to the file out. Make
- sure that /emx/bin is near the beginning of your PATH.
-
- You can apply the patches to the sources yourself, see the batch files
- gcc-emx.cmd, gdb-emx.cmd, bin-emx.cmd, gas-emx.cmd and info-emx.cmd in
- /emx/gnu. Some of these batch files require sed. These batch files
- have not been tested on FAT drives. gdb-del1.cmd can be used to
- delete files of the GDB distribution which are not required.
-
-
- Preliminary tasks
- -----------------
-
- Create the directories /emx/new and /emx/build:
-
- md \emx\new
- md \emx\build
-
-
- Building GCC
- ------------
-
- Edit makeexe.cmd and dostage1.cmd to contain the correct path for
- gcc.exe, cpp.exe, cc1.exe, as.exe, ld.exe and emxl.exe. The timings
- given are for a 33MHz 386DX.
-
- cd \emx\gnu\gcc-2.3
- dostage1 (38 min, using GCC 2.2.2)
- makeexe
- md stage1
- movstage stage1
- dostage2 (90 min)
- makeexe
- md stage2
- movstage stage2
- dostage3 (75 min)
-
- The files common to . and stage2 must be identical.
-
- makebin gcc cpp cc1 cc1plus cc1obj
-
- To recompile GCC without going through two or three stages, use
- compile.cmd.
-
-
- Building GAS
- ------------
-
- cd \emx\gnu\gas-1.38
- omake
- makebin as
-
-
- Building GDB
- ------------
-
- You need sed for compiling GDB.
-
- cd \emx\gnu\readline
- omake
- cd \emx\gnu\bfd
- omake
- cd \emx\gnu\libibert
- omake
- cd \emx\gnu\gdb-4.7
- omake
- makebin gdb
-
-
- Building the texinfo utilities
- ------------------------------
-
- cd \emx\gnu\texinfo
- omake
- makebin info makeinfo texindex
-
-
- Building the binary utilities (ld, ar, size, strip, nm, objdump)
- ----------------------------------------------------------------
-
- cd \emx\gnu\binutils
- omake
- makebin ld ar size strip nm objdump
-
- The makebin batch file converts a.out files to .exe files, using
- appropriate options. The .exe files are put into the directory
- /emx/new. To convert all a.out files (gcc, cpp, cc1, cc1plus, cc1obj,
- as, gdb, ld, ar, strip, size, nm, objdump), call
-
- makebin all
-
- After testing, you can move the .exe files from /emx/new to /emx/bin.
-
-
- Building genclass
- -----------------
-
- cd \emx\gnu\libg++\genclass
- dmake
-
-
- Building the libraries
- ======================
-
- Building libc.a (the emx C library)
- -----------------------------------
-
- cd \emx\lib
- omake
-
- This builds the following files in the directory /emx/lib:
-
- crt0.o startup code
- dll0.o startup code for dynamic link libraries
- libc.a the emx C library
- libgcc.a compiler helper functions
- libm.a math library (empty, all the math functions are in libc.a)
- libos2.a import library for OS/2 API
- libg.a dummy library (for -g)
-
-
- Building libgraph.a (the emx graphics library)
- ----------------------------------------------
-
- cd \emx\lib
- omake libgraph
-
- This builds /emx/lib/libgraph.a.
-
-
- Building libvideo.a (the emx video library)
- ----------------------------------------------
-
- cd \emx\lib
- omake libvideo
-
- This builds /emx/lib/libvideo.a.
-
-
- Building libtermc.a (the GNU termcap library)
- ---------------------------------------------
-
- cd \emx\gnu\termcap
- omake
-
- This builds /emx/lib/libtermc.a. Patches for termcap are not included
- -- I can't remember where I took the termcap sources from. I think
- they're from the GNUish MS-DOS project or from Kai Uwe Rommel's OS/2
- ports of GNU programs.
-
-
- Building libgpp.a and libstdio.a (the GNU C++ library)
- ------------------------------------------------------
-
- For building libgpp.a and libstdio.a you need OS/2 2.0. The library
- sources must be installed on an HPFS drive. If you've applied
- hpfs.cmd in /emx/include.cpp, you have to run fat.cmd to rename the
- include files to 8.3 names before building libgpp.a and libstdio.a.
- Additionally, you need the following utilities:
-
- dmake (tested with dmake 3.8)
- sh (tested with Data Logic sh 1.6.4)
-
- Both programs are usually available in OS/2 archives. The -t option
- must not be set in the EMXOPT environment variable.
-
- cd \emx\gnu\libg++
- dmake
- copy libgpp.a \emx\lib
- copy libstdio.a \emx\lib
-
-
- Building libobjc.a (runtime library for the Objective C language)
- -----------------------------------------------------------------
-
- cd \emx\gnu\gcc-2.3\objc
- omake
- copy libobjc.a \emx\lib
-
-
- Building libcurse.a (the BSD curses library)
- --------------------------------------------
-
- cd \emx\bsd\curses
- omake
- copy libcurse.a \emx\lib
-
- This builds /emx/lib/libcurse.a.
-
-
- Building libbsd.a (partial BSD C library)
- -----------------------------------------
-
- cd \emx\bsd\libc
- omake
- copy libbsd.a \emx\lib
-
- This builds /emx/lib/libbsd.a.
-
-
- Building the OMF libraries (.lib files)
- ---------------------------------------
-
- To create libsys.lib, type
-
- cd \emx\lib
- omake libsys
-
- Note that you need MASM 6.0 to build thunk.obj. If you don't have
- MASM 6.0, you should avoid deleting thunk.obj.
-
- To create the OMF libraries (.lib) from the a.out libraries (.a),
- enter
-
- cd \emx\lib
- omake omflib
-
- This builds the following files in the directory /emx/lib:
-
- dll0.obj startup code for dynamic link libraries
- libbsd.lib Partial BSD C library
- libc.lib the emx C library
- libcurse.lib BSD curses library
- libg.lib dummy library (for -g)
- libgcc.lib compiler helper functions
- libgpp.lib GNU C++ library
- libgraph.lib the emx graphics library
- libm.lib math library (empty, all the math functions are in libc.lib)
- libos2.lib import library for OS/2 API
- libstdio.lib GNU C++ library
- libtermc.lib GNU termcap library
- libvideo.lib the emx video library
-
-
- Building emxlibc.dll
- --------------------
-
- cd \emx\lib
- omake mt
-
- This builds the following files:
-
- /emx/dll/emxlibc.dll the dynamic link library
- /emx/lib/libmt.a import library
- /emx/lib/libmt.lib import library
-
- If emxlibc.dll is currently in use, copying to /emx/dll fails and
- you'll find emxlibc.dll in /emx/lib/mt.
-
- ---------------------------- END OF BUILD.DOC -------------------------------
-