mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 19:49:09 +02:00
+ Updated options
This commit is contained in:
parent
e680269a95
commit
75afe87443
@ -26,16 +26,19 @@ The current main targets are
|
|||||||
.I Go32V2
|
.I Go32V2
|
||||||
(Dos DJGPP extender),
|
(Dos DJGPP extender),
|
||||||
.I Freebsd,
|
.I Freebsd,
|
||||||
|
.I OpenBSD,
|
||||||
|
.I NetBSD,
|
||||||
.I Linux,
|
.I Linux,
|
||||||
.I OS/2
|
.I OS/2,
|
||||||
.I BeOS
|
.I BeOS,
|
||||||
|
.I Netware,
|
||||||
.I Solaris
|
.I Solaris
|
||||||
and
|
and
|
||||||
.I Win32.
|
.I Win32.
|
||||||
The other targets (M68K compilers for Atari and Amiga) are either based on older
|
The other targets (M68K compilers for Atari and Amiga) are either based on older
|
||||||
versions of the compiler or are still in development.
|
versions of the compiler or are still in development.
|
||||||
.PP
|
.PP
|
||||||
This manpage is meant for quick\-reference only. FPC comes with a great (600+ pages)
|
This manpage is meant for quick\-reference only. FPC comes with a great (2000+ pages)
|
||||||
manual, which is updated constantly, while this man page can be out of date.
|
manual, which is updated constantly, while this man page can be out of date.
|
||||||
|
|
||||||
.SH Version number
|
.SH Version number
|
||||||
@ -194,14 +197,10 @@ the file
|
|||||||
.I xxx
|
.I xxx
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
.BI \-Fg xxx
|
.BI \-FE xxx
|
||||||
(linux only, obsolete)
|
set the executable/unit output path to
|
||||||
.I xxx
|
.I xxx
|
||||||
specifies the path where the compiler can find the
|
.
|
||||||
.I GNU C
|
|
||||||
library. This is superseded by the
|
|
||||||
.I \-Fl
|
|
||||||
option.
|
|
||||||
.TP
|
.TP
|
||||||
.BI \-Fi xxx
|
.BI \-Fi xxx
|
||||||
adds
|
adds
|
||||||
@ -240,7 +239,7 @@ By default, the compiler only searches for units in the current directory
|
|||||||
and the directory where the compiler itself resides. This option tells the
|
and the directory where the compiler itself resides. This option tells the
|
||||||
compiler also to look in the directory
|
compiler also to look in the directory
|
||||||
.I xxx
|
.I xxx
|
||||||
\.
|
.
|
||||||
.TP
|
.TP
|
||||||
.BI \-FU xxx
|
.BI \-FU xxx
|
||||||
Tells the compiler to write units in directory
|
Tells the compiler to write units in directory
|
||||||
@ -252,10 +251,6 @@ Add
|
|||||||
.I xxx
|
.I xxx
|
||||||
to the include file search path.
|
to the include file search path.
|
||||||
This path is used when looking for include files.
|
This path is used when looking for include files.
|
||||||
.TP
|
|
||||||
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."
|
|
||||||
|
|
||||||
.PP Options controlling the kind of output
|
.PP Options controlling the kind of output
|
||||||
for more information on these options, see also the programmers manual.
|
for more information on these options, see also the programmers manual.
|
||||||
@ -266,8 +261,20 @@ This also counts for the (possibly) generated batch script.
|
|||||||
.TP
|
.TP
|
||||||
.BI \-al
|
.BI \-al
|
||||||
Tells the compiler to include the sourcecode lines
|
Tells the compiler to include the sourcecode lines
|
||||||
in the assembler file as comments. This feature is still experimental, and
|
in the assembler file as comments.
|
||||||
should be used with caution.
|
.TP
|
||||||
|
.BI \-an
|
||||||
|
Tells the compiler to include node information in the generated assembler file.
|
||||||
|
This is mainly for use by the compiler developers.
|
||||||
|
.TP
|
||||||
|
.BI \-ap
|
||||||
|
Tells the compiler to use pipes to communicate with the assembler.
|
||||||
|
.TP
|
||||||
|
.BI \-ar
|
||||||
|
Tells the compiler to include register allocation/deallocation information.
|
||||||
|
.TP
|
||||||
|
.BI \-at
|
||||||
|
Tells the compiler to include temparary register allocation/deallocation information.
|
||||||
.TP
|
.TP
|
||||||
.BI -A xxx
|
.BI -A xxx
|
||||||
specifies what kind of assembler should be generated . Here
|
specifies what kind of assembler should be generated . Here
|
||||||
@ -279,6 +286,15 @@ is one of the following :
|
|||||||
A unix .o (object) file, using
|
A unix .o (object) file, using
|
||||||
.I GNU AS
|
.I GNU AS
|
||||||
.TP
|
.TP
|
||||||
|
.I coff
|
||||||
|
coff object file (go32) using internal writer.
|
||||||
|
.TP
|
||||||
|
.I default
|
||||||
|
Use the default writer for the current platform.
|
||||||
|
.TP
|
||||||
|
.I elf
|
||||||
|
elf object file (linux, 32-bit only) using internal writer.
|
||||||
|
.TP
|
||||||
.I nasmcoff
|
.I nasmcoff
|
||||||
a coff file using the
|
a coff file using the
|
||||||
.I nasm
|
.I nasm
|
||||||
@ -289,7 +305,7 @@ a ELF32 file (LINUX only) using the
|
|||||||
.I nasm
|
.I nasm
|
||||||
assembler.
|
assembler.
|
||||||
.TP
|
.TP
|
||||||
.I nasmonj
|
.I nasmobj
|
||||||
a obj file using the
|
a obj file using the
|
||||||
.I nasm
|
.I nasm
|
||||||
assembler.
|
assembler.
|
||||||
@ -299,16 +315,34 @@ An obj file using the Microsoft
|
|||||||
.I masm
|
.I masm
|
||||||
assembler.
|
assembler.
|
||||||
.TP
|
.TP
|
||||||
|
.I pecoff
|
||||||
|
pecoff object file (win32) using internal writer.
|
||||||
|
.TP
|
||||||
.I tasm
|
.I tasm
|
||||||
An obj file using the Borland
|
An obj file using the Borland
|
||||||
.I tasm
|
.I tasm
|
||||||
assembler.
|
assembler.
|
||||||
|
.TP
|
||||||
|
.I wasm
|
||||||
|
An obj file using the Watcom assembler.
|
||||||
.RE
|
.RE
|
||||||
|
.TP
|
||||||
|
.BI \-Ccxxx
|
||||||
|
set the default calling convention to XXX.
|
||||||
.TP
|
.TP
|
||||||
.BI \-CD
|
.BI \-CD
|
||||||
Create dynamic library.
|
Create dynamic library.
|
||||||
.TP
|
.TP
|
||||||
|
.TP
|
||||||
|
.BI \-Ce
|
||||||
|
Compile using emulated floating point instructions.
|
||||||
|
.TP
|
||||||
|
.BI \-Cfxxx
|
||||||
|
Set the used floating point instruction set to xxx.
|
||||||
|
.TP
|
||||||
|
.BI \-Cg
|
||||||
|
Generate PIC code.
|
||||||
|
.TP
|
||||||
.BI \-Ch xxx
|
.BI \-Ch xxx
|
||||||
Reserves
|
Reserves
|
||||||
.I xxx
|
.I xxx
|
||||||
@ -325,6 +359,9 @@ Omit the linking stage.
|
|||||||
.BI \-Co
|
.BI \-Co
|
||||||
Generate Integer overflow checking code.
|
Generate Integer overflow checking code.
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-CR
|
||||||
|
Verify object call validity (method calls mustbe valid).
|
||||||
|
.TP
|
||||||
.BI \-Cr
|
.BI \-Cr
|
||||||
Generate Range checking code.
|
Generate Range checking code.
|
||||||
.TP
|
.TP
|
||||||
@ -333,14 +370,11 @@ Set stack size to
|
|||||||
.I xxx
|
.I xxx
|
||||||
bytes.
|
bytes.
|
||||||
.TP
|
.TP
|
||||||
.BI \-CS
|
|
||||||
Create static library.
|
|
||||||
.TP
|
|
||||||
.BI \-Ct
|
.BI \-Ct
|
||||||
generate stack checking code.
|
generate stack checking code.
|
||||||
.TP
|
.TP
|
||||||
.BI \-Cx
|
.BI \-CX
|
||||||
Use smartlinking when compiling and linking units.
|
Create a smartlinked library.
|
||||||
.TP
|
.TP
|
||||||
.BI \-d xxx
|
.BI \-d xxx
|
||||||
Define the symbol name
|
Define the symbol name
|
||||||
@ -354,7 +388,7 @@ Same as -Cn.
|
|||||||
.BI \-g
|
.BI \-g
|
||||||
Generate debugging information for debugging with
|
Generate debugging information for debugging with
|
||||||
.I GDB
|
.I GDB
|
||||||
|
.
|
||||||
.TP
|
.TP
|
||||||
.BI \-gg
|
.BI \-gg
|
||||||
idem as
|
idem as
|
||||||
@ -366,6 +400,15 @@ generate debugging info for dbx.
|
|||||||
.BI \-gh
|
.BI \-gh
|
||||||
use the heaptrc unit (see the units part of the FPC manual).
|
use the heaptrc unit (see the units part of the FPC manual).
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-gl
|
||||||
|
use the lineinfo unit for line information (see the units part of the FPC manual).
|
||||||
|
.TP
|
||||||
|
.BI \-gv
|
||||||
|
Generate information for debugging with valgrind.
|
||||||
|
.TP
|
||||||
|
.BI \-gw
|
||||||
|
Generate DWARF debugging information.
|
||||||
|
.TP
|
||||||
.BI \-O xxx
|
.BI \-O xxx
|
||||||
optimize the compiler's output;
|
optimize the compiler's output;
|
||||||
.I xxx
|
.I xxx
|
||||||
@ -424,40 +467,72 @@ Instead, the compiler writes a script, PPAS.BAT under DOS, or
|
|||||||
ppas.sh under Linux, which can then be executed to produce an
|
ppas.sh under Linux, which can then be executed to produce an
|
||||||
executable.
|
executable.
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-sh
|
||||||
|
Tells the compiler to generate a script that can be used to assemble
|
||||||
|
and link on the host system, not on the target system. Use this when
|
||||||
|
cross-compiling.
|
||||||
|
.TP
|
||||||
|
.BI \-sr
|
||||||
|
Skip register allocation stage in compiler (use with -ar)
|
||||||
|
.TP
|
||||||
|
.BI \-st
|
||||||
|
Tells the compiler to generate a script that can be used to assemble
|
||||||
|
and link on the target system, not on the host system. Use this when
|
||||||
|
cross-compiling.
|
||||||
|
.TP
|
||||||
.BI \-T xxx
|
.BI \-T xxx
|
||||||
Specifies the target operating system.
|
Specifies the target operating system.
|
||||||
.I xxx
|
.I xxx
|
||||||
can be one of the following:
|
can be one of the following:
|
||||||
.RS
|
.RS
|
||||||
.TP
|
.TP
|
||||||
|
.I EMX
|
||||||
|
OS/2 and DOS via the EMX extender.
|
||||||
|
.TP
|
||||||
|
.I FREEBSD
|
||||||
|
FreeBSD
|
||||||
|
.TP
|
||||||
.I GO32V2
|
.I GO32V2
|
||||||
DOS and version 2 of the DJ DELORIE extender.
|
DOS and version 2 of the DJ DELORIE extender.
|
||||||
.TP
|
.TP
|
||||||
.I LINUX
|
.I LINUX
|
||||||
Linux.
|
Linux.
|
||||||
.TP
|
.TP
|
||||||
|
.I NETBSD
|
||||||
|
Netbsd.
|
||||||
|
.TP
|
||||||
|
.I NETWARE
|
||||||
|
Novell Netware module (clib)
|
||||||
|
.TP
|
||||||
|
.I NETLIBC
|
||||||
|
Novell Netware module (libc)
|
||||||
|
.TP
|
||||||
|
.I OPENBSD
|
||||||
|
OpenBSD
|
||||||
|
.TP
|
||||||
.I OS2
|
.I OS2
|
||||||
OS/2 using EMX
|
OS/2 (native mode)
|
||||||
|
.TP
|
||||||
|
.I SunOS
|
||||||
|
Solaris SunOS
|
||||||
|
.TP
|
||||||
|
.I WATCOM
|
||||||
|
WatCOM dos extender
|
||||||
|
.TP
|
||||||
|
.I WDOSX
|
||||||
|
WDosX Dos extender
|
||||||
.TP
|
.TP
|
||||||
.I WIN32
|
.I WIN32
|
||||||
Windows 32 bit.
|
Windows 32 bit.
|
||||||
.TP
|
|
||||||
.I BeOS
|
|
||||||
BeOS 80x86
|
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.BI -u xxx
|
.BI -u xxx
|
||||||
undefine the symbol
|
undefine the symbol
|
||||||
.I xxx
|
.I xxx
|
||||||
\. This is the opposite of the
|
if it is defined. This is the opposite of the
|
||||||
.B \-d
|
.B \-d
|
||||||
option.
|
option.
|
||||||
.TP
|
.TP
|
||||||
.BI \-u xxx
|
|
||||||
Undefine symbol
|
|
||||||
.I xxx
|
|
||||||
\.
|
|
||||||
.TP
|
|
||||||
.BI \-X x
|
.BI \-X x
|
||||||
Executable options. These tell the compiler what
|
Executable options. These tell the compiler what
|
||||||
kind of executable should be generated. the parameter
|
kind of executable should be generated. the parameter
|
||||||
@ -472,16 +547,60 @@ you start to port Free Pascal to another operating system.
|
|||||||
.I D
|
.I D
|
||||||
Link with dynamic libraries (defines the FPC_LINK_DYNAMIC symbol)
|
Link with dynamic libraries (defines the FPC_LINK_DYNAMIC symbol)
|
||||||
.TP
|
.TP
|
||||||
|
.I d
|
||||||
|
Don't use the standard library path. Use this when cross-compiling, to avoid
|
||||||
|
linking with the host OS libraries.
|
||||||
|
.TP
|
||||||
|
.I Pxxx
|
||||||
|
Prepend the names of binutils (as, ld) with xxx. For use when cross-compiling.
|
||||||
|
.TP
|
||||||
|
.I rxxx
|
||||||
|
Set the library search path to xxx.
|
||||||
|
.TP
|
||||||
.I s
|
.I s
|
||||||
Strip the symbols from the executable.
|
Strip the symbols from the executable.
|
||||||
.TP
|
.TP
|
||||||
.I S
|
.I S
|
||||||
Link with static libraries (defines th FPC_LINK_STATIC symbol)
|
Link with static libraries (defines the FPC_LINK_STATIC symbol)
|
||||||
|
.TP
|
||||||
|
.I t
|
||||||
|
Link statically (passes -static to the linker)
|
||||||
|
.TP
|
||||||
|
.I X
|
||||||
|
Link smart. Using this option sets the FPC_LINK_SMART symbol.
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Options concerning the sources (language options)
|
Options concerning the sources (language options)
|
||||||
for more information on these options, see also Programmers Manual
|
for more information on these options, see also in the Programmers Manual
|
||||||
|
.TP
|
||||||
|
.BI \-M mode
|
||||||
|
Specify the language mode.
|
||||||
|
.I mode
|
||||||
|
can be one of the following:
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
.I delphi
|
||||||
|
Delphi-compatibility mode. This loads the objpas unit, and switches on ansistring mode (
|
||||||
|
.B -Sh
|
||||||
|
).
|
||||||
|
.TP
|
||||||
|
.I fpc
|
||||||
|
Default mode.
|
||||||
|
.TP
|
||||||
|
.I gpc
|
||||||
|
GNU pascal mode (does nothing at the moment)
|
||||||
|
.TP
|
||||||
|
.I macpas
|
||||||
|
MAC pascal mode. This loads the macpas unit and switches on some Mac extensions
|
||||||
|
(mainly macros)
|
||||||
|
.TP
|
||||||
|
.I objfpc
|
||||||
|
Object Pascal mode. This loads the objpas unit.
|
||||||
|
.TP
|
||||||
|
.I tp
|
||||||
|
Turbo Pascal mode.
|
||||||
|
.RE
|
||||||
.TP
|
.TP
|
||||||
.BI \-R xxx
|
.BI \-R xxx
|
||||||
Specifies what assembler you use in your "asm" assembler code
|
Specifies what assembler you use in your "asm" assembler code
|
||||||
@ -504,6 +623,9 @@ file.
|
|||||||
.BI \-S2
|
.BI \-S2
|
||||||
Switch on Delphi 2 extensions.
|
Switch on Delphi 2 extensions.
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-Sa
|
||||||
|
Generate code for assertions.
|
||||||
|
.TP
|
||||||
.BI \-Sc
|
.BI \-Sc
|
||||||
Support C-style operators, i.e. *=, +=, /= and -=.
|
Support C-style operators, i.e. *=, +=, /= and -=.
|
||||||
.TP
|
.TP
|
||||||
@ -519,6 +641,22 @@ the compiler will stop after the first error.
|
|||||||
.BI \-Sg
|
.BI \-Sg
|
||||||
Support the label and goto commands.
|
Support the label and goto commands.
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-Sh
|
||||||
|
use ansistrings by default.
|
||||||
|
.TP
|
||||||
|
.BI \-SIxxx
|
||||||
|
Specify the kind of interfaces.
|
||||||
|
.I xxx
|
||||||
|
can be one of the following:
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
.I COM
|
||||||
|
use COM interfaces. (all interfaces descend from IUnknown)
|
||||||
|
.TP
|
||||||
|
.I CORBA
|
||||||
|
use CORBA interfaces. (no inheritance is supposed)
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
.BI \-Si
|
.BI \-Si
|
||||||
Support C++ style INLINE.
|
Support C++ style INLINE.
|
||||||
.TP
|
.TP
|
||||||
@ -545,6 +683,10 @@ Allow the "static" keyword in objects.
|
|||||||
Do not check the unit name. Normally, the unit name
|
Do not check the unit name. Normally, the unit name
|
||||||
is the same as the filename. This option allows both to be different.
|
is the same as the filename. This option allows both to be different.
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-Ur
|
||||||
|
Create a release unit. This sets a special flag in the unit, causing the
|
||||||
|
compiler not to look for sources.
|
||||||
|
.TP
|
||||||
.BI \-Us
|
.BI \-Us
|
||||||
Compile a system unit. This option causes the
|
Compile a system unit. This option causes the
|
||||||
compiler to define only some very basic types.
|
compiler to define only some very basic types.
|
||||||
|
Loading…
Reference in New Issue
Block a user