fpccfg.inc 9.7 KB

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