Next: Using the configuration file
Up: Compiler configuration
Previous: Compiler configuration
The available options are listed by category:
- -h
- if you specify this option, the compiler outputs a list of all options,
and exits after that.
- -?
- idem as -h.
- -i
- This option tells the compiler to print the copyright information.
- -l
- This option tells the compiler to print the Free Pascal logo on standard
output. It also gives you the Free Pascal version number.
- -Lx
- Set the language the compiler uses for its messages.
x can be one of the following:
- D : Use German.
- E : Use English.
- -n
- Tells the compiler not to read the configuration file.
- -vxxx
- Be verbose. xxx is a combination of the following :
- e : Tells the compiler to show only errors. This option is on by default.
- i : Tells the compiler to show some general information.
- w : Tells the compiler to issue warnings.
- n : Tells the compiler to issue notes.
- h : Tells the compiler to issue hints.
- l : Tells the compiler to show the line numbers as it processes a
file. Numbers are shown per 100.
- u : Tells the compiler to print the names of the files it opens.
- t : Tells the compiler to print the names of the files it tries
to open.
- p : Tells the compiler to print the names of procedures and
functions as it is processing them.
- c : Tells the compiler to warn you when it processes a
conditional.
- m : Tells the compiler to write which macros are defined.
- d : Tells the compiler to write other debugging info.
- a : Tells the compiler to write all possible info. (this is the
same as spcifying all options)
- 0 : Tells the compiler to write no messages. This is useful when
you want to override the default setting in the configuration file.
- -exxx
- (LINUX only) xxx specifies the directory where the
compiler can find the executables as (the assembler) and ld (the
compiler).
- -Fexxx
- This option tells the compiler to write errors, etc. to
the file in xxx.
- -Fgxxx
- (LINUX only) xxx specifies the path where the compiler
can find the gnu C library.
- -Fixxx
- adds xxx to the path where the compiler searches for
its include files.
- -Flxxx
- Adds xxx to the library searching path, and is passed
to the linker.
- -Frxxx
- (LINUX only) xxx specifies the path where the
compiler can find the error-definitions file.
- -Fuxxx
- Idem as -Up.
- -P
- uses pipes instead of files when assembling. This may speed up
the compiler on OS/2 and LINUX. Only with assemblers (such as gnu
as) that support piping..
- -Upxxx
- Tells the compiler to add xxx to the path where to find
units.
By default, the compiler only searches for units in the current directory
and the directory where the compiler itself resides. This option tells the
compiler also to look in the directory xxx.
for more information on these options, see also Programmer's guide\
- -a
- Tells the compiler not to delete the assembler file.
This also counts for the (possibly) generated batch script.
- -Axxx
- specifies what kind of assembler should be generated . Here
xxx is one of the following :
- att : AT&T assembler.
- o : A unix .o (object) file.
- obj : A OMF file for using the NASM assembler.
- nasm : a coff file using the NASM assembler.
- masm : An assembler file for the Microsoft/Borland/Watcom assembler.
- -CD
- Force dynamic linking.
- -Chxxx
- Reserves xxx bytes heap.
- -Ci
- Generate Input/output checking code.
- -Cn
- Omit the linking stage.
- -Co
- Generate Integer overflow checking code.
- -Cr
- Generate Range checking code.
- -Csxxx
- Set stack size to xxx. (OS/2 only).
- CS
- Statically link your program/unit.
- -Ct
- generate stack checking code.
- -dxxx
- Define the symbol name xxx. This can be used
to conditionally compile parts of your code.
- -E Same as -Cn.
- -g
- Generate debugging information for debugging with
gdb.
- -gp
- Generate profiler code for gprof.
- -On
- optimize the compiler's output; n can have one
of the following values :
- a
- simple optimizations
- g
- optimize for size
- G
- optimize for time
- x
- optimize maximum
- z
- uncertain optimizations
- 2
- optimize for Pentium II (tm)
- 3
- optimize for i386
- 4
- optimize for i486
- 5
- optimize for Pentium (tm)
- 6
- optimizations for PentiumPro (tm)
The exact effect of these effects can be found in the appendices of the
Programmer's guide. - -oxxx
- Tells the compiler to use xxx as the name of the output
file (executable). Only with programs.
- -pg
- Tells the compiler to issue code for profiling support.
- -s
- Tells the compiler not to call the assembler and linker.
Instead, the compiler writes a script, PPAS.BAT under DOS, or
ppas.sh under LINUX, which can then be executed to produce an
executable.
- -Txxx
- Specifies the target operating system. xxx can be one of
the following:
- DOS : DOS and the DJ DELORIE extender.
- OS2 : OS/2 (2.x) (this is still under development).
- LINUX : LINUX.
- WIN32 : Windows 32 bit (this is still under development).
- GO32V2 : DOS and version 2 of the DJ DELORIE extender.
- -Uld
- make dynamic library from unit.
- -Uls
- make static library from unit.
- -uxxx
- Undefine symbol xxx.
- -Xx
- executable options. This tells the compiler what
kind of LINUX executable should be generated. the parameter x
can be one of the following:
- c : (LINUX only) Link with the C library. You should only use this when
you start to port Free Pascal to another operating system.
- s : (DOS only) Strip the symbols from the executable.
for more information on these options, see also Programmer's guide\
- -Rxxx
- Specifies what assembler you use in your asm assembler code
blocks. Here xxx is one of the following:
- att
- asm blocks contain AT&T assembler.
- intel
- asm blocks contain Intel assembler.
- direct
- asm blocks should be copied as-is in the assembler
file.
- -S2
- Switch on Delphi 2 extensions.
- -Sc
- Support C-style operators, i.e. *=, +=, /= and
-=.
- -Se
- The compiler stops after the first error. Normally,
the compiler tries to continue compiling after an error, until 50 errors are
reached, or a fatal error is reachd, and then it stops. With this switch,
the compiler will stop after the first error.
- -Sg
- Support the label and goto commands.
- -Si
- Support C++ style INLINE.
- -Sm
- Support C-style macros.
- -So
- Try to be Borland TP compatible (no function
overloading etc.).
- -Ss
- The name of constructors must be init, and the
name of destructors should be done.
- -St
- Allow the static keyword in objects.
- -Un
- Do not check the unit name. (Normally, the unit name
is the same as the filename. This option allows both to be different.)
- -Us
- Compile a system unit. This option causes the
compiler to define only some very basic types.
Next: Using the configuration file
Up: Compiler configuration
Previous: Compiler configuration
Michael Van Canneyt
Tue Mar 31 16:44:14 CEST 1998