Node:Cross-Compilers, Next:Crossbuilding, Previous:Compilation Notes, Up:Installation

### Building and Installing a cross-compiler

GNU Pascal can function as a cross-compiler for many machines. Information about GNU tools in a cross-configuration can be found at `ftp://ftp.cygnus.com/pub/embedded/crossgcc/`.

Since GNU Pascal generates assembler code, you need a cross-assembler that GNU Pascal can run, in order to produce object files. If you want to link on other than the target machine, you need a cross-linker as well. It is straightforward to install the GNU binutils to act as cross-tools - see the installation instructions of the GNU binutils for details.

You also need header files and libraries suitable for the target machine that you can install on the host machine. Please install them under `prefix/platform/include/`, for instance `/usr/local/i386-pc-msdosdjgpp/include/` for a cross-compiler from a typical Unix-like environment to MS-DOS with DJGPP.

Configuration and compilation of the compiler can then be done using the scripts `cfgpc` and `mkgpc` which are included in the source distribution in the subdirectory `p/script`. Please call them with the `-h` option for instructions.