|
@@ -983,6 +983,8 @@ platform only).
|
|
|
\item \var{r} : Rhide/GCC compatibility mode: formats the errors
|
|
|
differently, so they are understood by RHIDE.
|
|
|
\end{itemize}
|
|
|
+\item[V] write a file \file{fpcdebug.txt} with lots of debugging info.
|
|
|
+Mainly for the compiler developers.
|
|
|
\end{description}
|
|
|
|
|
|
%
|
|
@@ -994,6 +996,7 @@ differently, so they are understood by RHIDE.
|
|
|
compiler can find the executables \file{as} (the assembler) and \file{ld}
|
|
|
(the linker).
|
|
|
\olabel{e}
|
|
|
+\item[-FcXXX] set the input codepage to \var{XXX}. Experimental.
|
|
|
\item [-FD] same as \var{-e}.
|
|
|
\item [-Fexxx] This option tells the compiler to write errors, etc. to
|
|
|
the file named \file{xxx}.
|
|
@@ -1026,9 +1029,9 @@ You must {\em always} supply the path to the system unit.
|
|
|
instead of the current directory. It overrides the \var{-FE} option.
|
|
|
\item [-Ixxx] \olabel{I} Add \file{xxx} to the include file search path.
|
|
|
This option has the same effect as \var{-Fi}.
|
|
|
-\item [-P] uses pipes instead of files when assembling. This may speed up
|
|
|
-the compiler on \ostwo and \linux. Only with assemblers (such as \gnu
|
|
|
-\file{as}) that support piping...
|
|
|
+%\item [-P] uses pipes instead of files when assembling. This may speed up
|
|
|
+%the compiler on \ostwo and \linux. Only with assemblers (such as \gnu
|
|
|
+%\file{as}) that support piping...
|
|
|
\end{description}
|
|
|
|
|
|
% Options controlling the kind of output.
|
|
@@ -1041,6 +1044,14 @@ it generates (not when using the internal assembler).
|
|
|
This also counts for the (possibly) generated batch script.
|
|
|
\item [-al] \olabel{al} Tells the compiler to include the sourcecode lines
|
|
|
in the assembler file as comments.
|
|
|
+\item[-an] \olabel{an} Tells the compiler to write node information in the
|
|
|
+assember 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.
|
|
|
+\item[-ap] \olabel{ap} use pipes instead of creating temporary assembler
|
|
|
+files. This may speed up the compiler on \ostwo and \linux.
|
|
|
+Only with assemblers (such as \gnu %\file{as}) that support piping, and not
|
|
|
+if the internal assembler is used.
|
|
|
\item[-ar] \olabel{ar} tells the compiler to list register allocation and
|
|
|
release info in the assembler file. This is primarily intended for debugging
|
|
|
the code generated by the compiler.
|
|
@@ -1049,13 +1060,14 @@ temporary allocations and deallocations in the assembler file.
|
|
|
\item [-Axxx] \olabel{A} specifies what kind of assembler should be generated . Here
|
|
|
\var{xxx} is one of the following :
|
|
|
\begin{description}
|
|
|
+\item[default] use the built-in default.
|
|
|
\item[as] assemble using \gnu as.
|
|
|
-\item[asaout] assemble using \gnu as for aout (Go32v1).
|
|
|
\item[nasmcoff] coff (Go32v2) file using Nasm.
|
|
|
\item[nasmelf] elf32 (Linux) file using Nasm.
|
|
|
\item[nasmobj] object file using Nasm.
|
|
|
\item[masm] object file using Masm (Microsoft).
|
|
|
\item[tasm] object file using Tasm (Borland).
|
|
|
+\item[elf] elf32 (Linux) using internal writer.
|
|
|
\item[coff] coff object file (Go32v2) using the internal binary object writer.
|
|
|
\item[pecoff] pecoff object file (Win32) using the internal binary object writer.
|
|
|
\end{description}
|
|
@@ -1069,7 +1081,7 @@ information about local variables, types and procedures.
|
|
|
\item[-Cc] set the default calling convention used by the compiler.
|
|
|
\item [-CD] Create a dynamic library. This is used to transform units into
|
|
|
dynamically linkable libraries on \linux.
|
|
|
-\item[-CeXXX] set the used floating point emulation.
|
|
|
+\item[-Ce] Emulate floating point operations.
|
|
|
\item[-CfXXX] set the used floating point processor.
|
|
|
\item[-Cg] enable generation of PIC code.
|
|
|
\item [-Chxxx] \olabel {Ch} Reserves \var{xxx} bytes heap. \var{xxx} should
|
|
@@ -1080,7 +1092,7 @@ exit with a run-time error. Which error is generated depends on the I/O error.
|
|
|
\item [-Cn] \olabel{Cn} Omit the linking stage.
|
|
|
\item [-Co] \olabel{Co} Generate Integer overflow checking code. In case of
|
|
|
integer errors, a run-time error will be generated by your program.
|
|
|
-\item [-CpXXX] set the processor type to XXX
|
|
|
+%\item [-CpXXX] set the processor type to XXX
|
|
|
\item [-Cr] \olabel{Cr} Generate Range checking code. In case your program
|
|
|
acesses an array element with an invalid index, or if it increases an
|
|
|
enumerated type beyond it's scope, a run-time error will be generated.
|
|
@@ -1095,18 +1107,23 @@ the program. All unused code is left out. This can lead to substantially
|
|
|
smaller binaries.
|
|
|
\item [-dxxx] \olabel{d} Define the symbol name \var{xxx}. This can be used
|
|
|
to conditionally compile parts of your code.
|
|
|
+\item [-D] generate a DEF file (for OS/2)
|
|
|
+\item [-Dd] set the description of the executable/library (Windows)
|
|
|
+\item [-Dv] set the version of the executable/library (Windows)
|
|
|
\item {-E} \olabel{E} Same as \var{-Cn}.
|
|
|
\item [-g] \olabel{g} Generate debugging information for debugging with
|
|
|
\file{gdb}
|
|
|
-\item [-gg] idem as \var{-g}.
|
|
|
+\item [-gc] generate checks for pointers. This must be used with the
|
|
|
+\var{-gh} command-line option. When this options is enabled, it will verify
|
|
|
+that all pointer accesses are within the heap.
|
|
|
\item [-gd] \olabel{gd} generate debugging info for \file{dbx}.
|
|
|
+\item [-gg] idem as \var{-g}.
|
|
|
\item [-gh] use the heaptrc unit (see \unitsref). (produces a report
|
|
|
about heap usage after the program exits)
|
|
|
\item [-gl] use the lineinfo unit (see \unitsref). (produces file
|
|
|
name/line number information if the program exits due to an error.)
|
|
|
-\item [-gc] generate checks for pointers. This must be used with the
|
|
|
-\var{-gh} command-line option. When this options is enabled, it will verify
|
|
|
-that all pointer accesses are within the heap.
|
|
|
+\item [-gv] emit info for valgrind.
|
|
|
+\item [-gw] emit dwarf debugging info.
|
|
|
\item[-kxxx] pass \var{xxx} to the linker.
|
|
|
\item[-Oxxx] \olabel{O} optimize the compiler's output; \var{xxx} can have one
|
|
|
of the following values :
|
|
@@ -1126,7 +1143,7 @@ caution).
|
|
|
\item[3] optimizations for PentiumPro/PII/Cyrix 6x86/K6 (tm)
|
|
|
\end{description}
|
|
|
\end{description}
|
|
|
-The exact effect of these effects can be found in the \progref.
|
|
|
+The exact effect of these optimizations can be found in the \progref.
|
|
|
\item [-oxxx] Tells the compiler to use \var{xxx} as the name of the output
|
|
|
file (executable). Only with programs.
|
|
|
\item [-pg] \olabel{gp} Generate profiler code for \file{gprof}. This will
|
|
@@ -1137,7 +1154,7 @@ Instead, the compiler writes a script, \file{PPAS.BAT} under \dos, or
|
|
|
\file{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 some extra parameter, mainly
|
|
|
-used for cross-compilation.
|
|
|
+used for cross-compilation. It can have one of the following values:
|
|
|
\begin{description}
|
|
|
\item[h] Generate script to link on host. The generated script can be run on
|
|
|
the compilation platform (host platform).
|
|
@@ -1148,13 +1165,18 @@ can be run on the target platform. (where the binary must be run)
|
|
|
\item[-Txxx] \olabel{T} Specifies the target operating system. \var{xxx} can be one of
|
|
|
the following:
|
|
|
\begin{itemize}
|
|
|
-\item \textbf{GO32V1} : \dos and version 1 of the DJ DELORIE extender (no longer maintained).
|
|
|
-\item \textbf{GO32V2} : \dos and version 2 of the DJ DELORIE extender.
|
|
|
-\item \textbf{LINUX} : \linux.
|
|
|
-\item \textbf{OS2} : OS/2 (2.x) using the \var{EMX} extender.
|
|
|
-\item \textbf{WIN32} : \windows 32 bit.
|
|
|
-\item \textbf{SUNOS} : SunOS/Solaris.
|
|
|
-\item \textbf{BEOS} : BeOS.
|
|
|
+\item \textbf{emx} : OS/2 via EMX (and DOS via EMX extender)
|
|
|
+\item \textbf{freebsd} : FreeBSD.
|
|
|
+\item \textbf{go32v2} : \dos and version 2 of the DJ DELORIE extender.
|
|
|
+\item \textbf{linux} : \linux.
|
|
|
+\item \textbf{netbsd} : NetBSD.
|
|
|
+\item \textbf{netware} : Novell Netware Module (clib)
|
|
|
+\item \textbf{netwlibc} : Novell Netware Module (libc)
|
|
|
+\item \textbf{os2} : OS/2 (2.x) using the \var{EMX} extender.
|
|
|
+\item \textbf{sunos} : SunOS/Solaris.
|
|
|
+\item \textbf{watcom} : watcom compatible DOS extender
|
|
|
+\item \textbf{wdosx} : WDOSX extender.
|
|
|
+\item \textbf{win32} : \windows 32 bit.
|
|
|
\end{itemize}
|
|
|
\item [-uxxx] \olabel{u} Undefine the symbol \var{xxx}. This is the opposite
|
|
|
of the \var{-d} option.
|
|
@@ -1180,11 +1202,17 @@ can be one of the following:
|
|
|
\begin{itemize}
|
|
|
\item \textbf{c} : (\linux only) Link with the C library. You should only use this when
|
|
|
you start to port \fpc to another operating system. \olabel{Xe}
|
|
|
+\item \textbf{d} don't use the standard library path. This is needed for
|
|
|
+cross-compilation, to avoid linking with the host platform's libraries.
|
|
|
\item \textbf{D} : Link with dynamic libraries (defines the
|
|
|
\var{FPC\_LINK\_DYNAMIC} symbol) \olabel{XD}
|
|
|
+\item \textbf{pXXX} : Prepend binutils names with \var{XXX} for cross-compiling.
|
|
|
+\item \textbf{rXXX} : set library path to \var{XXX}.
|
|
|
\item \textbf{s} : Strip the symbols from the executable. \olabel{Xs}
|
|
|
\item \textbf{S} : Link with static units (defines the \var{FPC\_LINK\_STATIC} symbol)
|
|
|
\olabel{XS}
|
|
|
+\item \textbf{t} : link static. It passes the \var{-static} option to the
|
|
|
+linker. \olabel{Xt}
|
|
|
\item \textbf{X} : Link with smartlinked units (defines the
|
|
|
\var{FPC\_LINK\_SMART} symbol) \olabel{XX}
|
|
|
\end{itemize}
|
|
@@ -2890,31 +2918,54 @@ Windows for other servers, I'd be willing to include it here.
|
|
|
The following is alphabetical listing of all command-line options, as
|
|
|
generated by the compiler:
|
|
|
\begin{verbatim}
|
|
|
-Free Pascal Compiler version 1.0.5 [2001/10/29] for i386
|
|
|
-Copyright (c) 1993-2000 by Florian Klaempfl
|
|
|
-/usr/local/lib/fpc/1.0.5/fpc [options] <inputfile> [options]
|
|
|
+Free Pascal Compiler version 1.9.6 [2004/12/11] for i386
|
|
|
+Copyright (c) 1993-2004 by Florian Klaempfl
|
|
|
+/usr/local/lib/fpc/1.9.6/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
|
|
|
+ -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 to <x>
|
|
|
+ -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
|
|
|
-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:
|
|
|
+ -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>
|
|
@@ -2926,11 +2977,13 @@ put + after a boolean switch option to enable it, - to disable it
|
|
|
-Fu<x> adds <x> to unit path
|
|
|
-FU<x> set unit output path to <x>, overrides -FE
|
|
|
-g generate debugger information:
|
|
|
- -gg use gsym
|
|
|
+ -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
|
|
|
- -gc generate checks for pointers
|
|
|
+ -gv generates programs tracable with valgrind
|
|
|
+ -gw generate dwarf debugging info
|
|
|
-i information
|
|
|
-iD return compiler date
|
|
|
-iV return compiler version
|
|
@@ -2941,25 +2994,67 @@ put + after a boolean switch option to enable it, - to disable it
|
|
|
-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
|
|
|
-o<x> change the name of the executable produced to <x>
|
|
|
+ -O<x> optimizations:
|
|
|
+ -Og generate smaller code
|
|
|
+ -OG generate faster code (default)
|
|
|
+ -Or keep certain variables in registers
|
|
|
+ -Ou enable uncertain optimizations (see docs)
|
|
|
+ -O1 level 1 optimizations (quick optimizations)
|
|
|
+ -O2 level 2 optimizations (-O1 + slower optimizations)
|
|
|
+ -O3 level 3 optimizations (-O2 repeatedly, max 5 times)
|
|
|
+ -Op<x> target processor:
|
|
|
+ -Op1 set target processor to 386/486
|
|
|
+ -Op2 set target processor to Pentium/PentiumMMX (tm)
|
|
|
+ -Op3 set target processor to PPro/PII/c6x86/K6 (tm)
|
|
|
-pg generate profile code for gprof (defines FPC_PROFILE)
|
|
|
- -P use pipes instead of creating temporary assembler files
|
|
|
+ -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 switch some Delphi 2 extensions on
|
|
|
+ -S2 same as -Mobjfpc
|
|
|
-Sc supports operators like C (*=,+=,/= and -=)
|
|
|
- -sa include assertion code.
|
|
|
- -Sd tries to be Delphi compatible
|
|
|
+ -Sa include assertion code.
|
|
|
+ -Sd same as -Mdelphi
|
|
|
-Se<x> compiler stops after the <x> errors (default is 1)
|
|
|
-Sg allow LABEL and GOTO
|
|
|
-Sh Use ansistrings
|
|
|
-Si support C++ styled INLINE
|
|
|
+ -SI<x> set interface style to <x>
|
|
|
+ - **3SIcom COM compatible interface (default)
|
|
|
+ - **3SIcorba CORBA compatible interface
|
|
|
-Sm support macros like C (global)
|
|
|
- -So tries to be TP/BP 7.0 compatible
|
|
|
- -Sp tries to be gpc compatible
|
|
|
+ -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 (only with -a)
|
|
|
+ -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
|
|
|
-u<x> undefines the symbol <x>
|
|
|
-U unit options:
|
|
|
-Un don't check the unit name
|
|
@@ -2976,49 +3071,8 @@ put + after a boolean switch option to enable it, - to disable it
|
|
|
b : Show all procedure r : Rhide/GCC compatibility mode
|
|
|
declarations if an error x : Executable info (Win32 only)
|
|
|
occurs
|
|
|
- -X executable options:
|
|
|
- -Xc link with the c library
|
|
|
- -Xs strip all symbols from executable
|
|
|
- -XD try to link dynamic (defines FPC_LINK_DYNAMIC)
|
|
|
- -XS try to link static (default) (defines FPC_LINK_STATIC)
|
|
|
- -XX try to link smart (defines FPC_LINK_SMART)
|
|
|
-
|
|
|
-Processor specific options:
|
|
|
- -A<x> output format:
|
|
|
- -Aas assemble using GNU AS
|
|
|
- -Aasaout assemble using GNU AS for aout (Go32v1)
|
|
|
- -Anasmcoff coff (Go32v2) file using Nasm
|
|
|
- -Anasmelf elf32 (Linux) file using Nasm
|
|
|
- -Anasmobj obj file using Nasm
|
|
|
- -Amasm obj file using Masm (Microsoft)
|
|
|
- -Atasm obj file using Tasm (Borland)
|
|
|
- -Acoff coff (Go32v2) using internal writer
|
|
|
- -Apecoff pecoff (Win32) using internal writer
|
|
|
- -R<x> assembler reading style:
|
|
|
- -Ratt read AT&T style assembler
|
|
|
- -Rintel read Intel style assembler
|
|
|
- -Rdirect copy assembler text directly to assembler file
|
|
|
- -O<x> optimizations:
|
|
|
- -Og generate smaller code
|
|
|
- -OG generate faster code (default)
|
|
|
- -Or keep certain variables in registers
|
|
|
- -Ou enable uncertain optimizations (see docs)
|
|
|
- -O1 level 1 optimizations (quick optimizations)
|
|
|
- -O2 level 2 optimizations (-O1 + slower optimizations)
|
|
|
- -O3 level 3 optimizations (same as -O2u)
|
|
|
- -Op<x> target processor:
|
|
|
- -Op1 set target processor to 386/486
|
|
|
- -Op2 set target processor to Pentium/PentiumMMX (tm)
|
|
|
- -Op3 set target processor to PPro/PII/c6x86/K6 (tm)
|
|
|
- -T<x> Target operating system:
|
|
|
- -TGO32V1 version 1 of DJ Delorie DOS extender
|
|
|
- -TGO32V2 version 2 of DJ Delorie DOS extender
|
|
|
- -TLINUX Linux
|
|
|
- -TOS2 OS/2 2.x
|
|
|
- -TSUNOS SunOS/Solaris
|
|
|
- -TWin32 Windows 32 Bit
|
|
|
- -TBeOS BeOS
|
|
|
- -W<x> Win32 target options
|
|
|
+ -V write fpcdebug.txt file with lots of debugging info
|
|
|
+ -W<x> Win32-like target options
|
|
|
-WB<x> Set Image base to Hexadecimal <x> value
|
|
|
-WC Specify console type application
|
|
|
-WD Use DEFFILE to export functions of DLL or EXE
|
|
@@ -3026,6 +3080,16 @@ Processor specific options:
|
|
|
-WG Specify graphic type application
|
|
|
-WN Do not generate relocation code (necessary for debugging)
|
|
|
-WR Generate relocation code
|
|
|
+ -X executable options:
|
|
|
+ -Xc link with the c library
|
|
|
+ -Xd don't use standard library search path (needed for cross compile)
|
|
|
+ -XD try to link units dynamic (defines FPC_LINK_DYNAMIC)
|
|
|
+ -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
|