Chapter 11
Alphabetical listing of command-line options

The following is alphabetical listing of all command-line options, as generated by the compiler:
Free Pascal Compiler version 2.1.1 [2006/05/25] for i386  
Copyright (c) 1993-2006 by Florian Klaempfl  
/usr/local/lib/fpc/2.1.1/ppc386 [options] <inputfile> [options]  
put + after a boolean switch option to enable it, - to disable it  
  -a     the compiler doesn’t delete the generated assembler file  
      -al        list sourcecode lines in assembler file  
      -an        list node info in assembler file  
      -ap        use pipes instead of creating temporary assembler files  
      -ar        list register allocation/release info in assembler file  
      -at        list temp allocation/release info in assembler file  
  -A<x>  output format:  
      -Adefault  use default assembler  
      -Aas       assemble using GNU AS  
      -Anasmcoff coff (Go32v2) file using Nasm  
      -Anasmelf  elf32 (Linux) file using Nasm  
      -Anasmwin32Win32 object file using Nasm  
      -AnasmwdosxWin32/WDOSX object file using Nasm  
      -Awasm     obj file using Wasm (Watcom)  
      -Anasmobj  obj file using Nasm  
      -Amasm     obj file using Masm (Microsoft)  
      -Atasm     obj file using Tasm (Borland)  
      -Aelf      elf32 (Linux) using internal writer  
      -Acoff     coff (Go32v2) using internal writer  
      -Apecoff   pecoff (Win32) using internal writer  
  -b     generate browser info  
      -bl        generate local symbol info  
  -B     build all modules  
  -C<x>  code generation options:  
      -Cc<x>     set default calling convention to <x>  
      -CD        create also dynamic library (not supported)  
      -Ce        Compilation with emulated floating point opcodes  
      -Cf<x>     Select fpu instruction set to use, see fpc -i for possible values  
      -Cg        Generate PIC code  
      -Ch<n>     <n> bytes heap (between 1023 and 67107840)  
      -Ci        IO-checking  
      -Cn        omit linking stage  
      -Co        check overflow of integer operations  
      -Cp<x>     select instruction set, see fpc -i for possible values  
      -Cr        range checking  
      -CR        verify object method call validity  
      -Cs<n>     set stack size to <n>  
      -Ct        stack checking  
      -CX        create also smartlinked library  
  -d<x>  defines the symbol <x>  
  -D     generate a DEF file  
      -Dd<x>     set description to <x>  
      -Dv<x>     set DLL version to <x>  
  -e<x>  set path to executable  
  -E     same as -Cn  
  -F<x>  set file names and paths:  
      -Fa<x>[,y] for a program load first units <x> and [y] before uses is parsed  
      -Fc<x>     sets input codepage to <x>  
      -FD<x>     sets the directory where to search for compiler utilities  
      -Fe<x>     redirect error output to <x>  
      -FE<x>     set exe/unit output path to <x>  
      -Fi<x>     adds <x> to include path  
      -Fl<x>     adds <x> to library path  
      -FL<x>     uses <x> as dynamic linker  
      -Fo<x>     adds <x> to object path  
      -Fr<x>     load error message file <x>  
      -Fu<x>     adds <x> to unit path  
      -FU<x>     set unit output path to <x>, overrides -FE  
  -g     generate debugger information:  
      -gc        generate checks for pointers  
      -gd        use dbx  
      -gg        use gsym  
      -gh        use heap trace unit (for memory leak debugging)  
      -gl        use line info unit to show more info for backtraces  
      -gv        generates programs traceable with valgrind  
      -gw        generate dwarf debugging info  
  -i     information  
      -iD        return compiler date  
      -iV        return compiler version  
      -iSO       return compiler OS  
      -iSP       return compiler processor  
      -iTO       return target OS  
      -iTP       return target processor  
  -I<x>  adds <x> to include path  
  -k<x>  Pass <x> to the linker  
  -l     write logo  
  -M<x>  set language mode to <x>  
      -Mfpc      free pascal dialect (default)  
      -Mobjfpc   switch some Delphi 2 extensions on  
      -Mdelphi   tries to be Delphi compatible  
      -Mtp       tries to be TP/BP 7.0 compatible  
      -Mgpc      tries to be gpc compatible  
      -Mmacpas   tries to be compatible to the macintosh pascal dialects  
  -n     don’t read the default config file  
  -N<x>  node tree optimizations  
      -Nu        unroll loops  
  -o<x>  change the name of the executable produced to <x>  
  -O<x>  optimizations:  
      -O-        disable optimizations  
      -O1        level 1 optimizations (quick and debugger friendly)  
      -O2        level 2 optimizations (-O1 + quick optimizations)  
      -O3        level 3 optimizations (-O2 + slow optimizations)  
      -Oa<x>=<y> set alignment  
      -Oo[NO]<x> enable or disable optimizations, see fpc -i for possible values  
      -Op<x>     set target cpu for optimizing, see fpc -i for possible values  
      -Os        generate smaller code  
  -pg    generate profile code for gprof (defines FPC_PROFILE)  
  -R<x>  assembler reading style:  
      -Rdefault  use default assembler  
      -Ratt      read AT&T style assembler  
      -Rintel    read Intel style assembler  
  -S<x>  syntax options:  
      -S2        same as -Mobjfpc  
      -Sc        supports operators like C (*=,+=,/= and -=)  
      -Sa        include assertion code.  
      -Sd        same as -Mdelphi  
      -Se<x>     error options. <x> is a combination of the following:  
         <n> : compiler stops after the <n> errors (default is 1)  
         w : compiler stops also after warnings  
         n : compiler stops also after notes  
         h : compiler stops also after hints  
      -Sg        allow LABEL and GOTO  
      -Sh        Use ansistrings  
      -Si        support C++ styled INLINE  
      -Sk        load fpcylix unit  
      -SI<x>     set interface style to <x>  
         -SIcom     COM compatible interface (default)  
         -SIcorba   CORBA compatible interface  
      -Sm        support macros like C (global)  
      -So        same as -Mtp  
      -Sp        same as -Mgpc  
      -Ss        constructor name must be init (destructor must be done)  
      -St        allow static keyword in objects  
  -s     don’t call assembler and linker  
      -sh        Generate script to link on host  
      -st        Generate script to link on target  
      -sr        Skip register allocation phase (use with -alr)  
  -T<x>  Target operating system:  
      -Temx      OS/2 via EMX (including EMX/RSX extender)  
      -Tfreebsd  FreeBSD  
      -Tgo32v2   Version 2 of DJ Delorie DOS extender  
      -Tlinux    Linux  
      -Tnetbsd   NetBSD  
      -Tnetware  Novell Netware Module (clib)  
      -Tnetwlibc Novell Netware Module (libc)  
      -Topenbsd  OpenBSD  
      -Tos2      OS/2 / eComStation  
      -Tsunos    SunOS/Solaris  
      -Twatcom   Watcom compatible DOS extender  
      -Twdosx    WDOSX DOS extender  
      -Twin32    Windows 32 Bit  
      -Twince    Windows CE  
  -u<x>  undefines the symbol <x>  
  -U     unit options:  
      -Un        don’t check the unit name  
      -Ur        generate release unit files  
      -Us        compile a system unit  
  -v<x>  Be verbose. <x> is a combination of the following letters:  
      e : Show errors (default)       0 : Show nothing (except errors)  
      w : Show warnings               u : Show unit info  
      n : Show notes                  t : Show tried/used files  
      h : Show hints                  c : Show conditionals  
      i : Show general info           d : Show debug info  
      l : Show linenumbers            r : Rhide/GCC compatibility mode  
      a : Show everything             x : Executable info (Win32 only)  
      b : Write file names messages with full path  
      v : write fpcdebug.txt with     p : Write tree.log with parse tree  
          lots of debugging info  
  -W<x>  Win32-like target options  
      -WB        Create a relocatable image  
      -WB<x>     Set Image base to Hexadecimal <x> value  
      -WC        Specify console type application  
      -WD        Use DEFFILE to export functions of DLL or EXE  
      -WF        Specify full-screen type application (OS/2 only)  
      -WG        Specify graphic type application  
      -WN        Do not generate relocation code (necessary for debugging)  
      -WR        Generate relocation code  
  -X     executable options:  
      -Xc        pass --shared to the linker (Unix only)  
      -Xd        don’t use standard library search path (needed for cross compile)  
      -Xe        use external linker  
      -XD        try to link units dynamic          (defines FPC_LINK_DYNAMIC)  
      -Xi        use internal linker  
      -Xm        generate link map  
      -XM<x>     set the name of the ’main’ program routine (default is ’main’)  
      -XP<x>     prepend the binutils names with the prefix <x>  
      -Xr<x>     set library search path to <x> (needed for cross compile)  
      -Xs        strip all symbols from executable  
      -XS        try to link units static (default) (defines FPC_LINK_STATIC)  
      -Xt        link with static libraries (-static is passed to linker)  
      -XX        try to link units smart            (defines FPC_LINK_SMART)  
 
  -?     shows this help  
  -h     shows this help without waiting