1 | #
|
---|
2 | # Example fpc.cfg for Free Pascal Compiler
|
---|
3 | #
|
---|
4 |
|
---|
5 | # ----------------------
|
---|
6 | # Defines (preprocessor)
|
---|
7 | # ----------------------
|
---|
8 |
|
---|
9 | #
|
---|
10 | # nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed
|
---|
11 | #
|
---|
12 | # -d is the same as #DEFINE
|
---|
13 | # -u is the same as #UNDEF
|
---|
14 | #
|
---|
15 |
|
---|
16 | #
|
---|
17 | # Some examples (for switches see below, and the -? helppages)
|
---|
18 | #
|
---|
19 | # Try compiling with the -dRELEASE or -dDEBUG on the commandline
|
---|
20 | #
|
---|
21 |
|
---|
22 | # For a release compile with optimizes and strip debuginfo
|
---|
23 | #IFDEF RELEASE
|
---|
24 | -OG2p3
|
---|
25 | -Xs
|
---|
26 | #WRITE Compiling Release Version
|
---|
27 | #ENDIF
|
---|
28 |
|
---|
29 | # For a debug version compile with debuginfo and all codegeneration checks on
|
---|
30 | #IFDEF DEBUG
|
---|
31 | -g
|
---|
32 | -Crtoi
|
---|
33 | #WRITE Compiling Debug Version
|
---|
34 | #ENDIF
|
---|
35 |
|
---|
36 | # set binutils prefix
|
---|
37 | #IFDEF FPC_CROSSCOMPILING
|
---|
38 | -XP-
|
---|
39 | #ENDIF
|
---|
40 |
|
---|
41 | # ----------------
|
---|
42 | # Parsing switches
|
---|
43 | # ----------------
|
---|
44 |
|
---|
45 | # Pascal language mode
|
---|
46 | # -Mfpc free pascal dialect (default)
|
---|
47 | # -Mobjfpc switch some Delphi 2 extensions on
|
---|
48 | # -Mdelphi tries to be Delphi compatible
|
---|
49 | # -Mtp tries to be TP/BP 7.0 compatible
|
---|
50 | # -Mgpc tries to be gpc compatible
|
---|
51 | # -Mmacpas tries to be compatible to the macintosh pascal dialects
|
---|
52 | #
|
---|
53 | # Turn on Object Pascal extensions by default
|
---|
54 | #-Mobjfpc
|
---|
55 |
|
---|
56 | # Assembler reader mode
|
---|
57 | # -Rdefault use default assembler
|
---|
58 | # -Ratt read AT&T style assembler
|
---|
59 | # -Rintel read Intel style assembler
|
---|
60 | #
|
---|
61 | # All assembler blocks are AT&T styled by default
|
---|
62 | #-Ratt
|
---|
63 |
|
---|
64 | # Semantic checking
|
---|
65 | # -S2 same as -Mobjfpc
|
---|
66 | # -Sc supports operators like C (*=,+=,/= and -=)
|
---|
67 | # -Sa include assertion code.
|
---|
68 | # -Sd same as -Mdelphi
|
---|
69 | # -Se<x> compiler stops after the <x> errors (default is 1)
|
---|
70 | # -Sg allow LABEL and GOTO
|
---|
71 | # -Sh Use ansistrings
|
---|
72 | # -Si support C++ styled INLINE
|
---|
73 | # -SI<x> set interface style to <x>
|
---|
74 | # -SIcomCOM compatible interface (default)
|
---|
75 | # -SIcorbaCORBA compatible interface
|
---|
76 | # -Sm support macros like C (global)
|
---|
77 | # -So same as -Mtp
|
---|
78 | # -Sp same as -Mgpc
|
---|
79 | # -Ss constructor name must be init (destructor must be done)
|
---|
80 | # -St allow static keyword in objects
|
---|
81 | #
|
---|
82 | # Allow goto, inline, C-operators, C-vars
|
---|
83 | -Sgic
|
---|
84 |
|
---|
85 | # ---------------
|
---|
86 | # Code generation
|
---|
87 | # ---------------
|
---|
88 |
|
---|
89 | # Uncomment the next line if you always want static/dynamic units by default
|
---|
90 | # (can be overruled with -CD, -CS at the commandline)
|
---|
91 | #-CS
|
---|
92 | #-CD
|
---|
93 |
|
---|
94 | # Set the default heapsize to 8Mb
|
---|
95 | #-Ch8000000
|
---|
96 |
|
---|
97 | # Set default codegeneration checks (iocheck, overflow, range, stack)
|
---|
98 | #-Ci
|
---|
99 | #-Co
|
---|
100 | #-Cr
|
---|
101 | #-Ct
|
---|
102 |
|
---|
103 | # Optimizer switches for i386 compiler
|
---|
104 | # -Og generate smaller code
|
---|
105 | # -OG generate faster code (default)
|
---|
106 | # -Or keep certain variables in registers (still BUGGY!!!)
|
---|
107 | # -Ou enable uncertain optimizations (see docs)
|
---|
108 | # -O1 level 1 optimizations (quick optimizations)
|
---|
109 | # -O2 level 2 optimizations (-O1 + slower optimizations)
|
---|
110 | # -O3 level 3 optimizations (same as -O2u)
|
---|
111 | # -Op target processor
|
---|
112 | # -Op1 set target processor to 386/486
|
---|
113 | # -Op2 set target processor to Pentium/PentiumMMX (tm)
|
---|
114 | # -Op3 set target processor to PPro/PII/c6x86/K6 (tm)
|
---|
115 |
|
---|
116 | # Optimize always for Size and PII
|
---|
117 | #-OG2p3
|
---|
118 |
|
---|
119 |
|
---|
120 | # -----------------------
|
---|
121 | # Set Filenames and Paths
|
---|
122 | # -----------------------
|
---|
123 |
|
---|
124 | # Slashes are also allowed under dos
|
---|
125 |
|
---|
126 | # path to the messagefile, not necessary anymore but can be used to override
|
---|
127 | # the default language
|
---|
128 | #-Fr/usr/lib/fpc/$fpcversion/msg/errore.msg
|
---|
129 | #-Fr/usr/lib/fpc/$fpcversion/msg/errorn.msg
|
---|
130 |
|
---|
131 | # searchpath for includefiles
|
---|
132 | #-Fi/pp/inc;/pp/rtl/inc
|
---|
133 |
|
---|
134 | # searchpath for units and other system dependent things
|
---|
135 | -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget
|
---|
136 | -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/*
|
---|
137 | -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/rtl
|
---|
138 | #-Fu~/fpc/packages/base/*/units/;~/fpc/fcl/units/;~/fpc/rtl/units/
|
---|
139 |
|
---|
140 | # searchpath for libraries
|
---|
141 | -Fl/usr/lib/gcc/i386-redhat-linux/4.0.2
|
---|
142 | #-Fl/pp/lib
|
---|
143 | #-Fl/lib;/usr/lib
|
---|
144 |
|
---|
145 |
|
---|
146 | # -------------
|
---|
147 | # Linking
|
---|
148 | # -------------
|
---|
149 |
|
---|
150 | # generate always debugging information for GDB (slows down the compiling
|
---|
151 | # process)
|
---|
152 | # -gc generate checks for pointers
|
---|
153 | # -gd use dbx
|
---|
154 | # -gg use gsym
|
---|
155 | # -gh use heap trace unit (for memory leak debugging)
|
---|
156 | # -gl use line info unit to show more info for backtraces
|
---|
157 | # -gv generates programs tracable with valgrind
|
---|
158 | # -gw generate dwarf debugging info
|
---|
159 | #
|
---|
160 | # Enable debuginfo and use the line info unit by default
|
---|
161 | #-gl
|
---|
162 |
|
---|
163 | # always pass an option to the linker
|
---|
164 | #-k-s
|
---|
165 |
|
---|
166 | # Always strip debuginfo from the executable
|
---|
167 | -Xs
|
---|
168 |
|
---|
169 |
|
---|
170 | # -------------
|
---|
171 | # Miscellaneous
|
---|
172 | # -------------
|
---|
173 |
|
---|
174 | # Write always a nice FPC logo ;)
|
---|
175 | -l
|
---|
176 |
|
---|
177 | # Verbosity
|
---|
178 | # e : Show errors (default) d : Show debug info
|
---|
179 | # w : Show warnings u : Show unit info
|
---|
180 | # n : Show notes t : Show tried/used files
|
---|
181 | # h : Show hints m : Show defined macros
|
---|
182 | # i : Show general info p : Show compiled procedures
|
---|
183 | # l : Show linenumbers c : Show conditionals
|
---|
184 | # a : Show everything 0 : Show nothing (except errors)
|
---|
185 | # b : Show all procedure r : Rhide/GCC compatibility mode
|
---|
186 | # declarations if an error x : Executable info (Win32 only)
|
---|
187 | # occurs
|
---|
188 | #
|
---|
189 | # Display Info, Warnings, Notes and Hints
|
---|
190 | -viwn
|
---|
191 | # If you don't want so much verbosity use
|
---|
192 | #-vw
|
---|
193 |
|
---|
194 | #
|
---|
195 | # That's all folks
|
---|
196 | #
|
---|
197 | -Fl/usr/lib/mysql
|
---|