For more information on these options, see Programmer’s Guide.
Do not delete the assembler files (not applicable when using the internal assembler). This also applies to the (possibly) generated batch script.
Include the source code lines in the assembler file as comments.
Write node information in the assembler file (nodes are the way the compiler represents statements or parts thereof internally). This is primarily intended for debugging the code generated by the compiler.
Use pipes instead of creating temporary assembler files. This may speed up the compiler on os/2 and linux. Only with assemblers (such as gnu if the internal assembler is used.
List register allocation and release info in the assembler file. This is primarily intended for debugging the code generated by the compiler.
List information about temporary allocations and deallocations in the assembler file.
specify what kind of assembler should be generated. Here xxx is one of the following :
Use the built-in default.
Assemble using gnu as.
Assemble using gnu gas.
Assemble using gnu gas for darwin Mach-O64.
Coff (Go32v2) file using Nasm.
Elf32 (linux) file using Nasm.
Windows 32-bit file using Nasm.
Windows 64-bit file using Nasm.
Windows 32-bit/DOSX file using Nasm.
Object file using Nasm.darwin Mach-O64 using GNU GAS
Mach-O (Darwin, Intel 32 bit) using internal writer.
Object file using Masm (Microsoft).
Object file using Tasm (Borland).
Elf32 (linux) using internal writer.
Coff object file (Go32v2) using the internal binary object writer.
PECoff object file (Win32) using the internal binary object writer.
Object file using wasm (Watcom).
Object file using yasm (experimental).
Re-compile all used units, even if the unit sources didn’t change since the last compilation.
Generate browser info. This information can be used by an Integrated Development Environment (IDE) to provide information on classes, objects, procedures, types and variables in a unit.
The same as -b but also generates information about local variables, types and procedures.
Turn on (or off) IEEE error checking for constants.
Set the ABI (Application Binary Interface) to xxx. The -i option gives the possible values for xxx.
Generate big-endian code.
Set the default calling convention used by the compiler.
Create a dynamic library. This is used to transform units into dynamically linkable libraries on linux.
Emulate floating point operations.
Set the used floating point processor to xxx. fpc -i lists all possible values.
Set the minimal floating point precision to NN. Possible values are 32 and 64.
Enable generation of PIC code. This should only be necessary when generating libraries on linux or other Unices.
Reserves xxx bytes heap. xxx should be between 1024 and 67107840.
Generate Input/Output checking code. In case some input/output code of your program returns an error status, the program will exit with a run-time error. Which error is generated depends on the I/O error.
Omit the linking stage.
Generate nil-pointer checks (AIX-only).
Generate Integer overflow checking code. In case of integer errors, a run-time error will be generated by your program.
Check for possible overflow of integer operations.
Set the processor type to XXX.
Set the packing for X to N. X can be PACKSET, PACKENUM or PACKRECORDS, and N can be a value of 1,2,4,8 or one of the keywords DEFAULT (0) or NORMAL. PACKRECORDS supports also values 16 and 32. (see the Programmer’s Guide for more info).
Generate Range checking code. If your program accesses an array element with an invalid index, or if it increases an enumerated type beyond its scope, a run-time error will be generated.
Generate checks when calling methods to verify if the virtual method table for that object is valid. It will also insert an type check in case of typecasts.
Set stack size to xxx.
Generate stack checking code. If your program performs a faulty stack operation, a run-rime error will be generated.
Target specific code generation options:
Emit a CLD instruction before using the x86 string instructions
Create a smartlinked unit when writing a unit. Smartlinking will only link in the code parts that are actually needed by the program. All unused code is left out. This can lead to substantially smaller binaries.
Define the symbol name xxx. This can be used to conditionally compile parts of your code.
Generate a DEF file (for OS/2).
Set the description of the executable/library (Windows).
Set the version of the executable/library (Windows).
PM application (for OS/2)
Same as -Cn.
same as -Cg.
Generate debugging information for debugging with gdb.
Generate checks for pointers. This must be used with the -gh command line option. When this options is enabled, it will verify that all pointer accesses are within the heap.
Same as -g.
Use the heaptrc unit (see Unit Reference). (Produces a report about heap usage after the program exits)
Use the lineinfo unit (see Unit Reference). (Produces file name/line number information if the program exits due to an error.)
set debug information options. One of the options is dwarfsets: It enables dwarf set debug information (this does not work with gdb versions prior to 6.5. stabsabsincludes tells the compiler to store absolute/full include file paths in stabs. dwarfmethodclassprefix tells the compiler to prefix method names in DWARF with class name. item [-gp] Preserve case in stabs symbol names. Default is to uppercase all names.
Write stabs debug information.
Trash local variables. This writes a random value to local variables at procedure start. This can be used to detect uninitialized variables. The t can be specified multiple times
Emit info for valgrind. Note: this will include the cmem unit in your executable, replacing the default memory manager with the C memory manager.
Emit dwarf debugging info (version 2).
Emit dwarf debugging info (version 2).
Emit dwarf debugging info (version 3).
Emit dwarf debugging info (version 4, experimental).
Pass xxx to the linker.
Optimize the compiler’s output; xxx can have one of the following values :
Specify alignment of structures and code. PARAM determines what should be aligned; VALUE specifies the alignment boundary. See the Programmer’s Guide for a description of the possible values.
Level 1 optimizations (quick and debugger-friendly optimizations).
Level 2 optimizations (-O1 plus quick optimizations).
Level 3 optimizations (-O2 plus slower optimizations).
Level 4 optimizations (-O3 plus optimizations that might have side effects).
Specify individual optimizations: NNN can be one of
Use register variables
Uncertain optimizations (use with care)
Skip stack frames
Peephole optimizations
Common subexpression elimination at the assembler level (i386-only, deprecated)
Unroll (small) loops
Change tail recursion to non-recursive loop
Common subexpression elimination
Enable Data Flow Analysis
Use the EBP/RBP register to hold variables (x86-only)
Reorder class instance fields if this results in better alignment
Fast math operations (may reduce floating point precision)
Remove calls to empty procedures.
Constant propagation (experimental, requires -Oodfa)
select processor xxx to optimize for. fpc -i lists all available processor instruction sets.
Generate Whole-Program-Optimization information for feature xxx. fpc -i will generate a list of possible values.
Perform Whole-Program-Optimization information for feature xxx. fpc -i will generate a list of possible values.
Optimize for size rather than speed.
The exact effect of some of these optimizations can be found in the Programmer’s Guide.
Use xxx as the name of the output file (executable). For use only with programs. The output filename can contain a path, and if it does, it will override any previous -FE setting. If the output filename does not contain a path, the -FE setting is observed.
Generate profiler code for gprof. This will define the symbol FPC_PROFILE, which can be used in conditional defines.
Show default Target CPU compiler binary
Show default target cpu
Set target CPU (arm,avr,i386,jvm,m68k,mips,mipsel,powerpc,powerpc64,sparc,x86_64) ]
Do not 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. This can be used to speed up the compiling process or to debug the compiler’s output. This option can take an extra parameter, mainly used for cross-compilation. It can have one of the following values:
Generate script to link on host. The generated script can be run on the compilation platform (host platform).
Generate script to link on target platform. The generated script can be run on the target platform. (where the binary is intended to be run)
Skip register allocation phase (optimizations will be disabled).
Specify the target operating system. xxx can be one of the following:
darwin : Darwin Mac OS/X.
emx : OS/2 via EMX (and DOS via EMX extender).
freebsd : FreeBSD.
go32v2 : dos and version 2 of the DJ DELORIE extender.
iphonesim : iPhone simulator.
linux : linux.
netbsd : NetBSD.
netware : Novell Netware Module (clib).
netwlibc : Novell Netware Module (libc).
openbsd : OpenBSD.
os2 : OS/2 (2.x) using the EMX extender.
sunos : SunOS/Solaris.
watcom : Watcom compatible DOS extender
wdosx : WDOSX extender.
win32 : Windows 32 bit.
win64 : Windows 64 bit.
wince : Windows for handhelds (ARM processor).
The available list of targets depends on the actual compiler binary. Use fpc -i to get a list of targets supported by the compiler binary.
Undefine the symbol xxx. This is the opposite of the -d option.
Generate release unit files. These files will not be recompiled, even when the sources are available. This is useful when making release distributions. This also overrides the -B option for release mode units.
Set some Windows or os/2 attributes of the generated binary. It can be one or more of the following
Specify native type application (Windows)
Create a bundle instead of a library (Darwin)
Create arelocatable image (Windows)
Set preferred base address to hhh (a hexadecimal address)
Generate a console application (+) or a gui application (-).
Force use of Def file for exports.
Use external resources (Darwin)
Generate a FS application (+) or a console application (-).
Generate a GUI application (+) or a console application (-).
Use internal (FPC) resources (Darwin)
Turn on/off the usage of import sections (Windows)
Minimum Mac OS X deployment version: nnn equals 10.4, 10.5.1, ... (Darwin)
Do not generate a relocation section.
Minimum iOS deployment version needed (iphonesim) XXX is one of 8.0, 8.0.2, etc.
Generate a relocation section.
Generate a TOOL application (+) or a console application (-).
Enable use of an executable stack (Linux)
Specify executable options. This tells the compiler what kind of 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.
d Do not use the standard library path. This is needed for cross-compilation, to avoid linking with the host platform’s libraries.
D : Link with dynamic libraries (defines the FPC_LINK_DYNAMIC symbol)
e use external (GNU) linker.
f Substitute pthread library name for linking (BSD).
g Create debug information in a separate file and add a debuglink section to executable.
i use internal linker.
LA Define library name substitutions for the linking stage.
LO Define the order of library linking.
LD Exclude default order of standard libraries.
MXXX : Set the name of the program entry routine. The default is ’main’.
m : Generate linker map file.
n : Use target system native linker instead of GNU ld (Solaris, AIX)
pXXX : First search for the compiler binary in the directory XXX. (fpc command only).
PXXX : Prepend binutils names with XXX for cross-compiling.
rXXX : Set library path to XXX.
Rxxx Prepend xxx to all linker search paths. (used for cross compiling).
s : Strip the symbols from the executable.
S : Link with static units (defines the FPC_LINK_STATIC symbol).
t : Link static (passes the -static option to the linker).
v : Generate table for Virtual Entry calls.
X : Link with smartlinked units (defines the FPC_LINK_SMART symbol).