Go to the first, previous, next, last section, table of contents.

GNU Pascal for MS-DOS or OS/2 with EMX

EMX is a FreeWare 32-bit DOS extender which adds some properties of UNIX to the DOS and OS/2 operating systems written by Eberhard Mattes. You can find it, for example, via anonymous `ftp' on the server `ftp.uni-stuttgart.de' in the directory `pub/systems/os2/emx*'.

The EMX extender for DOS and OS/2 makes it relatively easy to port GNU tools--such as the GNU Pascal Compiler--to these platforms. However, it is not straightforward to compile it. There is no bash. No symbolic links. 8.3 file names. Etc. It took me about two complete days to find out what to do--not much when facing the about 15 MegaBytes of sources, but enough. The method I finally did it through might be not the best one but it works, and I document it here. If somebody finds a cleaner way how to compile GNU Pascal for EMX, please let me know! <peter.gerwinski@uni-essen.de>.

  1. I assume you have the EMX package installed with GNU development tools and the nmake make utility. If you are using a DOS system, you are in trouble now, because the required utility nmake is an OS/2 program. I was not able to replace it with, for example, Borland make; if you are, please inform me.
  2. Get the patched source code GCCSRC1.ZIP, GCCSRC2.ZIP, GCCSRC3.ZIP for GCC version 2.7.2. (The correct version is important.) Get the original source ZIP archive for GNU Pascal (GPC) 2.7.2 from `kampi.hut.fi'.
  3. Unzip the source for GCC. E.g. with PKUNZIP, when the ZIP files are in the `C:\' directory:
      pkunzip -d c:\gccsrc? \
    
  4. Unzip the source for GPC in the `emx\gnu' directory.
      cd \emx\gnu
      pkunzip -d c:\gpc-272
    
  5. Rename the GCC subdirectory in `\emx\gnu' to make things more symmetric. (-: Don't omit this because the Makefile I created relies on this naming.)
      rendir gcc-2.7 gcc-272
    
    (with OS/2: `ren')
  6. Cd to the EMX subdirectory and run the nmake utility telling it whether you are using a FAT or a HPFS partition. Use UPPERCASE here--nmake is case-sensitive.
      cd gpc-272\emx
      nmake FS=FAT
    
    Be patient -- this will take a while to complete.
  7. That's it. Hope that not too much went wrong. Write some tiny test programs. Write useful larger programs with GPC ...

Go to the first, previous, next, last section, table of contents.