summaryrefslogtreecommitdiff
path: root/utils/fpcmkcfg/fpccfg.inc
blob: a790085673466d9598d12ea8b35e6899b40fcb07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
{$ifdef Delphi}
const DefaultConfig : array[0..30] of string[240]=(
{$else Delphi}
const DefaultConfig : array[0..30,1..240] of char=(
{$endif Delphi}
  '#'#010+
  '# Config file generated by fpcmkcfg on %BUILDDATE% - %BUILDTIME%'#010+
  '# Example fpc.cfg for Free Pascal Compiler'#010+
  '#'#010+
  #010+
  '# ----------------------'#010+
  '# Defines (preprocessor)'#010+
  '# ----------------------'#010+
  #010+
  '#'#010+
  '# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE,',' #UNDEF are allowed'+
  #010+
  '#'#010+
  '# -d is the same as #DEFINE'#010+
  '# -u is the same as #UNDEF'#010+
  '#'#010+
  #010+
  '#'#010+
  '# Some examples (for switches see below, and the -? helppages)'#010+
  '#'#010+
  '# Try compiling with the -dRELEASE or -dDEBUG on the commandline'#010+
  '#'#010+
  #010+
  '# For a release compile w','ith optimizes and strip debuginfo'#010+
  '#IFDEF RELEASE'#010+
  '  -O2'#010+
  '  -Xs'#010+
  '  #WRITE Compiling Release Version'#010+
  '#ENDIF'#010+
  #010+
  '# For a debug version compile with debuginfo and all codegeneration ch'+
  'ecks on'#010+
  '#IFDEF DEBUG'#010+
  '  -gl'#010+
  '  -Crtoi'#010+
  '  #WRITE Compiling Debug Versi','on'#010+
  '#ENDIF'#010+
  #010+
  '# assembling'#010+
  '#ifdef darwin'#010+
  '# use pipes instead of temporary files for assembling'#010+
  '-ap'#010+
  '#endif'#010+
  #010+
  '# ----------------'#010+
  '# Parsing switches'#010+
  '# ----------------'#010+
  #010+
  '# Pascal language mode'#010+
  '#      -Mfpc      free pascal dialect (default)'#010+
  '#      ','-Mobjfpc   switch some Delphi 2 extensions on'#010+
  '#      -Mdelphi   tries to be Delphi compatible'#010+
  '#      -Mtp       tries to be TP/BP 7.0 compatible'#010+
  '#      -Mgpc      tries to be gpc compatible'#010+
  '#      -Mmacpas   tries to be compatible to the ma','cintosh pascal dia'+
  'lects'#010+
  '#'#010+
  '# Turn on Object Pascal extensions by default'#010+
  '#-Mobjfpc'#010+
  #010+
  '# Assembler reader mode'#010+
  '#      -Rdefault  use default assembler'#010+
  '#      -Ratt      read AT&T style assembler'#010+
  '#      -Rintel    read Intel style assembler'#010+
  '#'#010+
  '# ','All assembler blocks are AT&T styled by default'#010+
  '#-Ratt'#010+
  #010+
  '# Semantic checking'#010+
  '#      -S2        same as -Mobjfpc'#010+
  '#      -Sc        supports operators like C (*=,+=,/= and -=)'#010+
  '#      -Sa        include assertion code.'#010+
  '#      -Sd        same as',' -Mdelphi'#010+
  '#      -Se<x>     error options. <x> is a combination of the following'+
  ':'#010+
  '#         <n> : compiler stops after <n> errors (default is 1)'#010+
  '#         w   : compiler stops also after warnings'#010+
  '#         n   : compiler stops also after no','tes'#010+
  '#         h   : compiler stops also after hints'#010+
  '#      -Sg        allow LABEL and GOTO'#010+
  '#      -Sh        Use ansistrings'#010+
  '#      -Si        support C++ styled INLINE'#010+
  '#      -Sk        load fpcylix unit'#010+
  '#      -SI<x>     set interface sty','le to <x>'#010+
  '#         -SIcom    COM compatible interface (default)'#010+
  '#         -SIcorba  CORBA compatible interface'#010+
  '#      -Sm        support macros like C (global)'#010+
  '#      -So        same as -Mtp'#010+
  '#      -Sp        same as -Mgpc'#010+
  '#      -Ss      ','  constructor name must be init (destructor must be '+
  'done)'#010+
  '#      -Sx        enable exception keywords (default in Delphi/ObjFPC '+
  'modes)'#010+
  '#'#010+
  '# Allow goto, inline, C-operators, C-vars'#010+
  '-Sgic'#010+
  #010+
  '# ---------------'#010+
  '# Code generation'#010+
  '# ---------------'#010,
  #010+
  '# Uncomment the next line if you always want static/dynamic units by d'+
  'efault'#010+
  '# (can be overruled with -CD, -CS at the commandline)'#010+
  '#-CS'#010+
  '#-CD'#010+
  #010+
  '# Set the default heapsize to 8Mb'#010+
  '#-Ch8000000'#010+
  #010+
  '# Set default codegeneration checks (iocheck, over','flow, range, stack'+
  ')'#010+
  '#-Ci'#010+
  '#-Co'#010+
  '#-Cr'#010+
  '#-Ct'#010+
  #010+
  '# Optimizer switches'#010+
  '# -Os        generate smaller code'#010+
  '# -Oa=N      set alignment to N'#010+
  '# -O1        level 1 optimizations (quick optimizations, debuggable)'#010+
  '# -O2        level 2 optimizations (-O1 + ','optimizations which make d'+
  'ebugging more difficult)'#010+
  '# -O3        level 3 optimizations (-O2 + optimizations which also may'+
  ' make the program slower rather than faster)'#010+
  '# -Oo<x>     switch on optimalization x. See fpc -i for possible value'+
  's'#010+
  '# ','-OoNO<x>   switch off optimalization x. See fpc -i for possible va'+
  'lues'#010+
  '# -Op<x>     set target cpu for optimizing, see fpc -i for possible va'+
  'lues'#010+
  #010+
  '#ifdef darwin'#010+
  '#ifdef cpui386'#010+
  '-Cppentiumm'#010+
  '-Oppentiumm'#010+
  '#endif'#010+
  '#endif'#010+
  #010+
  '# -----------------------',#010+
  '# Set Filenames and Paths'#010+
  '# -----------------------'#010+
  #010+
  '# Both slashes and backslashes are allowed in paths'#010+
  #010+
  '# path to the messagefile, not necessary anymore but can be used to ov'+
  'erride'#010+
  '# the default language'#010+
  '#-Fr%basepath%/msg/errore.msg'#010+
  '#-F','r%basepath%/msg/errorn.msg'#010+
  '#-Fr%basepath%/msg/errores.msg'#010+
  '#-Fr%basepath%/msg/errord.msg'#010+
  '#-Fr%basepath%/msg/errorr.msg'#010+
  #010+
  '# search path for unicode binary files (FPC 2.x does not know this swi'+
  'tch)'#010+
  '#ifndef VER2'#010+
  '-FM%sharepath%/unicode/'#010+
  '#endif'#010+
  #010+
  '#',' searchpath for units and other system dependent things'#010+
  '-Fu%basepath%/units/$fpctarget'#010+
  '-Fu%basepath%/units/$fpctarget/*'#010+
  '-Fu%basepath%/units/$fpctarget/rtl'#010+
  #010+
  '#ifdef cpui8086'#010+
  '-Fu%basepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel'#010+
  '-Fu%basep','ath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/*'#010+
  '-Fu%basepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/rtl'#010+
  '#endif'#010+
  #010+
  '#IFDEF FPCAPACHE_1_3'#010+
  '-Fu%basepath%/units/$fpctarget/httpd13/'#010+
  '#ELSE'#010+
  '#IFDEF FPCAPACHE_2_0'#010+
  '-Fu%basepath%/units/$fpctarge','t/httpd20'#010+
  '#ELSE'#010+
  '-Fu%basepath%/units/$fpctarget/httpd22'#010+
  '#ENDIF'#010+
  '#ENDIF'#010+
  #010+
  '# searchpath for fppkg user-specific packages'#010+
  '-Fu%localbasepath%/units/$FPCTARGET/*'#010+
  #010+
  '# searchpath for tools'#010+
  '-FD%basepath%/bin/$FPCTARGET'#010+
  #010+
  '# path to the gcclib'#010+
  '%gcclibpath','%'#010+
  #010+
  '# searchpath for libraries'#010+
  '#-Fl%basepath%/lib'#010+
  '#-Fl/lib;/usr/lib'#010+
  '-Fl%basepath%/lib/$FPCTARGET'#010+
  #010+
  '%NEEDCROSSBINUTILSIFDEF%'#010+
  #010+
  '# never need cross-prefix when targeting the JVM'#010+
  '# (no native compiler, always cross-compiling)'#010+
  '#ifdef cpujvm'#010+
  '#undef ','NEEDCROSSBINUTILS'#010+
  '#endif'#010+
  #010+
  '# for android cross-prefix is set by compiler'#010+
  '#ifdef android'#010+
  '#undef NEEDCROSSBINUTILS'#010+
  '#endif'#010+
  #010+
  '# never need cross-prefix when targeting the i8086'#010+
  '# (no native compiler, always cross-compiling)'#010+
  '#ifdef cpui8086'#010+
  '#undef',' NEEDCROSSBINUTILS'#010+
  '#endif'#010+
  #010+
  '# never need cross-prefix when targeting the i8086'#010+
  '# (no native compiler, always cross-compiling)'#010+
  '#ifdef cpujvm'#010+
  '#undef NEEDCROSSBINUTILS'#010+
  '#endif'#010+
  #010+
  '# binutils prefix for cross compiling'#010+
  '#IFDEF FPC_CROSSCOMPILING'#010+
  '#IFD','EF NEEDCROSSBINUTILS'#010+
  '  -XP$FPCTARGET-'#010+
  '#ENDIF'#010+
  '#ENDIF'#010+
  #010+
  #010+
  '# -------------'#010+
  '# Linking'#010+
  '# -------------'#010+
  #010+
  '# generate always debugging information for GDB (slows down the compil'+
  'ing'#010+
  '# process)'#010+
  '#      -gc        generate checks for pointers'#010+
  '#      -gd ','       use dbx'#010+
  '#      -gg        use gsym'#010+
  '#      -gh        use heap trace unit (for memory leak debugging)'#010+
  '#      -gl        use line info unit to show more info for backtraces'#010+
  '#      -gv        generates programs tracable with valgrind'#010+
  '# ','     -gw        generate dwarf debugging info'#010+
  '#'#010+
  '# Enable debuginfo and use the line info unit by default'#010+
  '#-gl'#010+
  #010+
  '# always pass an option to the linker'#010+
  '#-k-s'#010+
  #010+
  '# Always strip debuginfo from the executable'#010+
  '-Xs'#010+
  #010+
  '# Always use smartlinking on i8086',', because the system unit exceeds '+
  'the 64kb'#010+
  '# code limit'#010+
  '#ifdef cpui8086'#010+
  '-CX'#010+
  '-XX'#010+
  '#endif'#010+
  #010+
  #010+
  '# -------------'#010+
  '# Miscellaneous'#010+
  '# -------------'#010+
  #010+
  '# Write always a nice FPC logo ;)'#010+
  '-l'#010+
  #010+
  '# Verbosity'#010+
  '#      e : Show errors (default)       d : Show debu','g info'#010+
  '#      w : Show warnings               u : Show unit info'#010+
  '#      n : Show notes                  t : Show tried/used files'#010+
  '#      h : Show hints                  s : Show time stamps'#010+
  '#      i : Show general info           q : Show me','ssage numbers'#010+
  '#      l : Show linenumbers            c : Show conditionals'#010+
  '#      a : Show everything             0 : Show nothing (except errors'+
  ')'#010+
  '#      b : Write file names messages   r : Rhide/GCC compatibility mod'+
  'e'#010+
  '#          with full ','path              x : Executable info (Win32 on'+
  'ly)'#010+
  '#      v : write fpcdebug.txt with     p : Write tree.log with parse t'+
  'ree'#010+
  '#          lots of debugging info'#010+
  '#'#010+
  '# Display Info, Warnings and Notes'#010+
  '-viwn'#010+
  '# If you don'#039't want so much verbosity ','use'#010+
  '#-vw'#010
);