Compiling the compiler can be done with one statement. It's always best to remove all units from
the compiler directory rst, so something like
on linux, and on dos
After this, the compiler can be compiled with the following command-line:
ppc386 -Tlinux -Fu../rtl/linux -di386 -dGDB pp.pas
|
So, the minimum options are:
- The target OS. Can be skipped when compiling for the same target as the compiler
which is being used.
- A path to an RTL. Can be skipped if a correct fpc.cfg con guration is on the system.
If the compiler should be compiled with the RTL that was compiled rst, this should
be ../rtl/OS (replace the OS with the appropriate operating system subdirectory of the
RTL).
- A de ne with the processor for which the compiler is compiled for. Required.
- -dGDB. Required.
- -Sg is needed, some parts of the compiler use goto statements (to be speci c: the
scanner).
So the absolute minimal command line is
ppc386 -di386 -dGDB -Sg pp.pas
|
Some other command-line options can be used, but the above are the minimum. A list of
recognised options can be found in table (F.1).
Table F.1: | Possible de nes when compiling FPC |
De ne | does what |
|
| GDB | Support of the GNU Debugger (required switch). |
I386 | Generate a compiler for the Intel i386+ processor family. |
M68K | Generate a compiler for the M680x0 processor family. |
X86_64 | Generate a compiler for the AMD64 processor family. |
POWERPC | Generate a compiler for the PowerPC processor family. |
POWERPC64 | Generate a compiler for the 64-bit PowerPC processor family. |
ARM | Generate a compiler for the Intel ARM processor family. |
SPARC | Generate a compiler for the SPARC processor family. |
EXTDEBUG | Some extra debug code is executed. |
MEMDEBUG | Some memory usage information is displayed. |
SUPPORT_MMX | only i386: enables the compiler switch MMX which |
| allows the compiler to generate MMX instructions. |
EXTERN_MSG | Don't compile the msg les in the compiler, always use |
| external message les. |
NOOPT | Do not include the optimizer in the compiler. |
CMEM | Use the C memory manager. |
|
| |
|
This list may be subject to change, the source le pp.pas always contains an up-to-date
list.