fpccfg.inc 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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. '# path to Xcode 4.3+ utilities (no problem if it doesn'#039't exist)'#010+
  49. '-FD/Applications/Xcode.app/Contents/Developer/usr/bin'#010+
  50. '#endif'#010+
  51. #010+
  52. '# ----------------',#010+
  53. '# Parsing switches'#010+
  54. '# ----------------'#010+
  55. #010+
  56. '# Pascal language mode'#010+
  57. '# -Mfpc free pascal dialect (default)'#010+
  58. '# -Mobjfpc switch some Delphi 2 extensions on'#010+
  59. '# -Mdelphi tries to be Delphi compatible'#010+
  60. '# -Mtp tries to b','e TP/BP 7.0 compatible'#010+
  61. '# -Mgpc tries to be gpc compatible'#010+
  62. '# -Mmacpas tries to be compatible to the macintosh pascal diale'+
  63. 'cts'#010+
  64. '#'#010+
  65. '# Turn on Object Pascal extensions by default'#010+
  66. '#-Mobjfpc'#010+
  67. #010+
  68. '# Assembler reader mode'#010+
  69. '# -Rdefaul','t use default assembler'#010+
  70. '# -Ratt read AT&T style assembler'#010+
  71. '# -Rintel read Intel style assembler'#010+
  72. '#'#010+
  73. '# All assembler blocks are AT&T styled by default'#010+
  74. '#-Ratt'#010+
  75. #010+
  76. '# Semantic checking'#010+
  77. '# -S2 same as -Mobjfpc'#010+
  78. '# -Sc ',' supports operators like C (*=,+=,/= and -=)'#010+
  79. '# -Sa include assertion code.'#010+
  80. '# -Sd same as -Mdelphi'#010+
  81. '# -Se<x> error options. <x> is a combination of the following'+
  82. ':'#010+
  83. '# <n> : compiler stops after <n>',' errors (default is 1)'#010+
  84. '# w : compiler stops also after warnings'#010+
  85. '# n : compiler stops also after notes'#010+
  86. '# h : compiler stops also after hints'#010+
  87. '# -Sg allow LABEL and GOTO'#010+
  88. '# -Sh Use ansistrin','gs'#010+
  89. '# -Si support C++ styled INLINE'#010+
  90. '# -Sk load fpcylix unit'#010+
  91. '# -SI<x> set interface style to <x>'#010+
  92. '# -SIcom COM compatible interface (default)'#010+
  93. '# -SIcorba CORBA compatible interface'#010+
  94. '# -Sm',' support macros like C (global)'#010+
  95. '# -So same as -Mtp'#010+
  96. '# -Sp same as -Mgpc'#010+
  97. '# -Ss constructor name must be init (destructor must be do'+
  98. 'ne)'#010+
  99. '# -Sx enable exception keywords (default in Delphi/O','bjFP'+
  100. 'C modes)'#010+
  101. '#'#010+
  102. '# Allow goto, inline, C-operators, C-vars'#010+
  103. '-Sgic'#010+
  104. #010+
  105. '# ---------------'#010+
  106. '# Code generation'#010+
  107. '# ---------------'#010+
  108. #010+
  109. '# Uncomment the next line if you always want static/dynamic units by d'+
  110. 'efault'#010+
  111. '# (can be overruled with -CD, -CS at the com','mandline)'#010+
  112. '#-CS'#010+
  113. '#-CD'#010+
  114. #010+
  115. '# Set the default heapsize to 8Mb'#010+
  116. '#-Ch8000000'#010+
  117. #010+
  118. '# Set default codegeneration checks (iocheck, overflow, range, stack)'#010+
  119. '#-Ci'#010+
  120. '#-Co'#010+
  121. '#-Cr'#010+
  122. '#-Ct'#010+
  123. #010+
  124. '# Optimizer switches'#010+
  125. '# -Os generate smaller code'#010+
  126. '# -Oa=N set alignmen','t to N'#010+
  127. '# -O1 level 1 optimizations (quick optimizations, debuggable)'#010+
  128. '# -O2 level 2 optimizations (-O1 + optimizations which make deb'+
  129. 'ugging more difficult)'#010+
  130. '# -O3 level 3 optimizations (-O2 + optimizations which also may'+
  131. ' ','make the program slower rather than faster)'#010+
  132. '# -Oo<x> switch on optimalization x. See fpc -i for possible value'+
  133. 's'#010+
  134. '# -OoNO<x> switch off optimalization x. See fpc -i for possible valu'+
  135. 'es'#010+
  136. '# -Op<x> set target cpu for optimizing, see fpc',' -i for possible '+
  137. 'values'#010+
  138. #010+
  139. '#ifdef darwin'#010+
  140. '#ifdef cpui386'#010+
  141. '-Cppentiumm'#010+
  142. '-Oppentiumm'#010+
  143. '#endif'#010+
  144. '#endif'#010+
  145. #010+
  146. '# -----------------------'#010+
  147. '# Set Filenames and Paths'#010+
  148. '# -----------------------'#010+
  149. #010+
  150. '# Both slashes and backslashes are allowed in paths'#010+
  151. #010+
  152. '# path to the m','essagefile, not necessary anymore but can be used to '+
  153. 'override'#010+
  154. '# the default language'#010+
  155. '#-Fr%basepath%/msg/errore.msg'#010+
  156. '#-Fr%basepath%/msg/errorn.msg'#010+
  157. '#-Fr%basepath%/msg/errores.msg'#010+
  158. '#-Fr%basepath%/msg/errord.msg'#010+
  159. '#-Fr%basepath%/msg/errorr.msg'#010+
  160. #010+
  161. '# s','earch path for unicode binary files (FPC 2.x does not know this s'+
  162. 'witch)'#010+
  163. '#ifndef VER2'#010+
  164. '-FM%sharepath%/unicode/'#010+
  165. '#endif'#010+
  166. #010+
  167. '# searchpath for units and other system dependent things'#010+
  168. '-Fu%basepath%/units/$fpctarget'#010+
  169. '-Fu%basepath%/units/$fpctarget/*'#010+
  170. '-F','u%basepath%/units/$fpctarget/rtl'#010+
  171. #010+
  172. '#ifdef cpui8086'#010+
  173. '-Fu%basepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel'#010+
  174. '-Fu%basepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/*'#010+
  175. '-Fu%basepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/rtl'#010+
  176. '#endif'#010,
  177. #010+
  178. '#IFDEF FPCAPACHE_1_3'#010+
  179. '-Fu%basepath%/units/$fpctarget/httpd13/'#010+
  180. '#ELSE'#010+
  181. '#IFDEF FPCAPACHE_2_0'#010+
  182. '-Fu%basepath%/units/$fpctarget/httpd20'#010+
  183. '#ELSE'#010+
  184. '-Fu%basepath%/units/$fpctarget/httpd22'#010+
  185. '#ENDIF'#010+
  186. '#ENDIF'#010+
  187. #010+
  188. '# searchpath for fppkg user-specific packages'#010+
  189. '-Fu%lo','calbasepath%/units/$FPCTARGET/*'#010+
  190. #010+
  191. '# path to the gcclib'#010+
  192. '%gcclibpath%'#010+
  193. #010+
  194. '# searchpath for libraries'#010+
  195. '#-Fl%basepath%/lib'#010+
  196. '#-Fl/lib;/usr/lib'#010+
  197. '-Fl%basepath%/lib/$FPCTARGET'#010+
  198. #010+
  199. '# searchpath for tools'#010+
  200. '-FD%basepath%/bin/$FPCTARGET'#010+
  201. #010+
  202. '%NEEDCROSSBINUTILSIFDEF%'#010,
  203. #010+
  204. '# never need cross-prefix when targeting the JVM'#010+
  205. '# (no native compiler, always cross-compiling)'#010+
  206. '#ifdef cpujvm'#010+
  207. '#undef NEEDCROSSBINUTILS'#010+
  208. '#endif'#010+
  209. #010+
  210. '# for android cross-prefix is set by compiler'#010+
  211. '#ifdef android'#010+
  212. '#undef NEEDCROSSBINUTILS'#010+
  213. '#endif'#010+
  214. #010+
  215. '# ','never need cross-prefix when targeting the i8086'#010+
  216. '# (no native compiler, always cross-compiling)'#010+
  217. '#ifdef cpui8086'#010+
  218. '#undef NEEDCROSSBINUTILS'#010+
  219. '#endif'#010+
  220. #010+
  221. '# never need cross-prefix when targeting the i8086'#010+
  222. '# (no native compiler, always cross-compilin','g)'#010+
  223. '#ifdef cpujvm'#010+
  224. '#undef NEEDCROSSBINUTILS'#010+
  225. '#endif'#010+
  226. #010+
  227. '# binutils prefix for cross compiling'#010+
  228. '#IFDEF FPC_CROSSCOMPILING'#010+
  229. '#IFDEF NEEDCROSSBINUTILS'#010+
  230. ' -XP$FPCTARGET-'#010+
  231. '#ENDIF'#010+
  232. '#ENDIF'#010+
  233. #010+
  234. #010+
  235. '# -------------'#010+
  236. '# Linking'#010+
  237. '# -------------'#010+
  238. #010+
  239. '# generate always debuggi','ng information for GDB (slows down the comp'+
  240. 'iling'#010+
  241. '# process)'#010+
  242. '# -gc generate checks for pointers'#010+
  243. '# -gd use dbx'#010+
  244. '# -gg use gsym'#010+
  245. '# -gh use heap trace unit (for memory leak debugging)'#010+
  246. '# -gl ',' use line info unit to show more info for backtrace'+
  247. 's'#010+
  248. '# -gv generates programs tracable with valgrind'#010+
  249. '# -gw generate dwarf debugging info'#010+
  250. '#'#010+
  251. '# Enable debuginfo and use the line info unit by default'#010+
  252. '#-gl'#010+
  253. #010+
  254. '# always pa','ss an option to the linker'#010+
  255. '#-k-s'#010+
  256. #010+
  257. '# Always strip debuginfo from the executable'#010+
  258. '-Xs'#010+
  259. #010+
  260. '# Always use smartlinking on i8086, because the system unit exceeds th'+
  261. 'e 64kb'#010+
  262. '# code limit'#010+
  263. '#ifdef cpui8086'#010+
  264. '-CX'#010+
  265. '-XX'#010+
  266. '#endif'#010+
  267. #010+
  268. #010+
  269. '# -------------'#010+
  270. '# Miscellaneous'#010+
  271. '#',' -------------'#010+
  272. #010+
  273. '# Write always a nice FPC logo ;)'#010+
  274. '-l'#010+
  275. #010+
  276. '# Verbosity'#010+
  277. '# e : Show errors (default) d : Show debug info'#010+
  278. '# w : Show warnings u : Show unit info'#010+
  279. '# n : Show notes t : Show tried/use','d files'#010+
  280. '# h : Show hints s : Show time stamps'#010+
  281. '# i : Show general info q : Show message numbers'#010+
  282. '# l : Show linenumbers c : Show conditionals'#010+
  283. '# a : Show everything 0 : Show',' nothing (except erro'+
  284. 'rs)'#010+
  285. '# b : Write file names messages r : Rhide/GCC compatibility mod'+
  286. 'e'#010+
  287. '# with full path x : Executable info (Win32 only'+
  288. ')'#010+
  289. '# v : write fpcdebug.txt with p : Write tree.log with parse t'+
  290. 'r','ee'#010+
  291. '# lots of debugging info'#010+
  292. '#'#010+
  293. '# Display Info, Warnings and Notes'#010+
  294. '-viwn'#010+
  295. '# If you don'#039't want so much verbosity use'#010+
  296. '#-vw'#010
  297. );