fpccfg.inc 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. {$ifdef Delphi}
  2. const DefaultConfig : array[0..29] of string[240]=(
  3. {$else Delphi}
  4. const DefaultConfig : array[0..29,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. '#ELSE'#010+
  43. ' # Strip debuginfo from the executable if not in debug mode'#010+
  44. ' -Xs'#010+
  45. '#ENDIF'#010+
  46. #010+
  47. '# assembling'#010+
  48. '#ifdef darwin'#010+
  49. '# use pipes instead of temporary files for assembling'#010+
  50. '-ap'#010+
  51. '#endif'#010+
  52. #010+
  53. '# ----------------'#010+
  54. '# Parsing switches'#010+
  55. '# ----------------'#010+
  56. #010+
  57. '# Pas','cal language mode'#010+
  58. '# -Mfpc free pascal dialect (default)'#010+
  59. '# -Mobjfpc switch some Delphi 2 extensions on'#010+
  60. '# -Mdelphi tries to be Delphi compatible'#010+
  61. '# -Mtp tries to be TP/BP 7.0 compatible'#010+
  62. '# -Mgpc trie','s to be gpc compatible'#010+
  63. '# -Mmacpas tries to be compatible to the macintosh pascal diale'+
  64. 'cts'#010+
  65. '#'#010+
  66. '# Turn on Object Pascal extensions by default'#010+
  67. '#-Mobjfpc'#010+
  68. #010+
  69. '# Assembler reader mode'#010+
  70. '# -Rdefault use default assembler'#010+
  71. '# -Ratt re','ad AT&T style assembler'#010+
  72. '# -Rintel read Intel style assembler'#010+
  73. '#'#010+
  74. '# All assembler blocks are AT&T styled by default'#010+
  75. '#-Ratt'#010+
  76. #010+
  77. '# Semantic checking'#010+
  78. '# -S2 same as -Mobjfpc'#010+
  79. '# -Sc supports operators like C (*=,+=,/= an','d -=)'#010+
  80. '# -Sa include assertion code.'#010+
  81. '# -Sd same as -Mdelphi'#010+
  82. '# -Se<x> error options. <x> is a combination of the following'+
  83. ':'#010+
  84. '# <n> : compiler stops after <n> errors (default is 1)'#010+
  85. '# w : compil','er stops also after warnings'#010+
  86. '# n : compiler stops also after notes'#010+
  87. '# h : compiler stops also after hints'#010+
  88. '# -Sg allow LABEL and GOTO'#010+
  89. '# -Sh Use ansistrings'#010+
  90. '# -Si support C++ styled INLIN','E'#010+
  91. '# -Sk load fpcylix unit'#010+
  92. '# -SI<x> set interface style to <x>'#010+
  93. '# -SIcom COM compatible interface (default)'#010+
  94. '# -SIcorba CORBA compatible interface'#010+
  95. '# -Sm support macros like C (global)'#010+
  96. '# ',' -So same as -Mtp'#010+
  97. '# -Sp same as -Mgpc'#010+
  98. '# -Ss constructor name must be init (destructor must be do'+
  99. 'ne)'#010+
  100. '# -Sx enable exception keywords (default in Delphi/ObjFPC '+
  101. 'modes)'#010+
  102. '#'#010+
  103. '# Allow goto, inline, C-operat','ors, C-vars'#010+
  104. '-Sgic'#010+
  105. #010+
  106. '# ---------------'#010+
  107. '# Code generation'#010+
  108. '# ---------------'#010+
  109. #010+
  110. '# Uncomment the next line if you always want static/dynamic units by d'+
  111. 'efault'#010+
  112. '# (can be overruled with -CD, -CS at the commandline)'#010+
  113. '#-CS'#010+
  114. '#-CD'#010+
  115. #010+
  116. '# Set the default heapsi','ze to 8Mb'#010+
  117. '#-Ch8000000'#010+
  118. #010+
  119. '# Set default codegeneration checks (iocheck, overflow, range, stack)'#010+
  120. '#-Ci'#010+
  121. '#-Co'#010+
  122. '#-Cr'#010+
  123. '#-Ct'#010+
  124. #010+
  125. '# Optimizer switches'#010+
  126. '# -Os generate smaller code'#010+
  127. '# -Oa=N set alignment to N'#010+
  128. '# -O1 level 1 optimizations (qu','ick optimizations, debuggable)'+
  129. #010+
  130. '# -O2 level 2 optimizations (-O1 + optimizations which make deb'+
  131. 'ugging more difficult)'#010+
  132. '# -O3 level 3 optimizations (-O2 + optimizations which also may'+
  133. ' make the program slower rather than faster)'#010+
  134. '#',' -Oo<x> switch on optimalization x. See fpc -i for possible val'+
  135. 'ues'#010+
  136. '# -OoNO<x> switch off optimalization x. See fpc -i for possible valu'+
  137. 'es'#010+
  138. '# -Op<x> set target cpu for optimizing, see fpc -i for possible va'+
  139. 'lues'#010+
  140. #010+
  141. '#ifdef darwin'#010+
  142. '#ifdef',' cpui386'#010+
  143. '-Cppentiumm'#010+
  144. '-Oppentiumm'#010+
  145. '#endif'#010+
  146. '#endif'#010+
  147. #010+
  148. '# -----------------------'#010+
  149. '# Set Filenames and Paths'#010+
  150. '# -----------------------'#010+
  151. #010+
  152. '# Both slashes and backslashes are allowed in paths'#010+
  153. #010+
  154. '# path to the messagefile, not necessary anymore but can be ','used to '+
  155. 'override'#010+
  156. '# the default language'#010+
  157. '#-Fr%basepath%/msg/errore.msg'#010+
  158. '#-Fr%basepath%/msg/errorn.msg'#010+
  159. '#-Fr%basepath%/msg/errores.msg'#010+
  160. '#-Fr%basepath%/msg/errord.msg'#010+
  161. '#-Fr%basepath%/msg/errorr.msg'#010+
  162. #010+
  163. '# search path for unicode binary files (FPC 2.x ','does not know this s'+
  164. 'witch)'#010+
  165. '#ifndef VER2'#010+
  166. '-FM%sharepath%/unicode/'#010+
  167. '#endif'#010+
  168. #010+
  169. '# Search for $fpctarget/$fpcsubarch-$fpcmemorymodel/ subdirectory firs'+
  170. 't'#010+
  171. '# for i8086 CPU'#010+
  172. '#ifdef cpui8086'#010+
  173. '-Fu%basepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel'#010+
  174. '-Fu%b','asepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/*'#010+
  175. '-Fu%basepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/rtl'#010+
  176. '#endif'#010+
  177. #010+
  178. '# searchpath for units and other system dependent things'#010+
  179. '-Fu%basepath%/units/$fpctarget'#010+
  180. '-Fu%basepath%/units/$fpct','arget/*'#010+
  181. '-Fu%basepath%/units/$fpctarget/rtl'#010+
  182. #010+
  183. '#IFDEF FPCAPACHE_1_3'#010+
  184. '-Fu%basepath%/units/$fpctarget/httpd13/'#010+
  185. '#ELSE'#010+
  186. '#IFDEF FPCAPACHE_2_0'#010+
  187. '-Fu%basepath%/units/$fpctarget/httpd20'#010+
  188. '#ELSE'#010+
  189. '-Fu%basepath%/units/$fpctarget/httpd22'#010+
  190. '#ENDIF'#010+
  191. '#ENDIF'#010+
  192. #010+
  193. '# searchp','ath for fppkg user-specific packages'#010+
  194. '-Fu%localbasepath%/units/$FPCTARGET/*'#010+
  195. #010+
  196. '# searchpath for tools'#010+
  197. '-FD%basepath%/bin/$FPCTARGET'#010+
  198. #010+
  199. '# path to the gcclib'#010+
  200. '%gcclibpath%'#010+
  201. #010+
  202. '# searchpath for libraries'#010+
  203. '#-Fl%basepath%/lib'#010+
  204. '#-Fl/lib;/usr/lib'#010+
  205. '-Fl%basepath','%/lib/$FPCTARGET'#010+
  206. #010+
  207. '%NEEDCROSSBINUTILSIFDEF%'#010+
  208. #010+
  209. '# never need cross-prefix when targeting the JVM'#010+
  210. '# (no native compiler, always cross-compiling)'#010+
  211. '#ifdef cpujvm'#010+
  212. '#undef NEEDCROSSBINUTILS'#010+
  213. '#endif'#010+
  214. #010+
  215. '# for android cross-prefix is set by compiler'#010+
  216. '#ifdef ','android'#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 cpui8086'#010+
  223. '#undef NEEDCROSSBINUTILS'#010+
  224. '#endif'#010+
  225. #010+
  226. '# binutils prefix for cross compiling'#010+
  227. '#IFDEF FPC_CRO','SSCOMPILING'#010+
  228. '#IFDEF 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 poin','ters'#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 use smartlinking on i8086, because the system unit exceeds ','t'+
  256. 'he 64kb'#010+
  257. '# code limit'#010+
  258. '#ifdef cpui8086'#010+
  259. '-CX'#010+
  260. '-XX'#010+
  261. '#endif'#010+
  262. #010+
  263. #010+
  264. '# -------------'#010+
  265. '# Miscellaneous'#010+
  266. '# -------------'#010+
  267. #010+
  268. '# Write always a nice FPC logo ;)'#010+
  269. '-l'#010+
  270. #010+
  271. '# Verbosity'#010+
  272. '# e : Show errors (default) d : Show debug info'#010+
  273. '# w : Show warnings ',' u : Show unit info'#010+
  274. '# n : Show notes t : Show tried/used files'#010+
  275. '# h : Show hints s : Show time stamps'#010+
  276. '# i : Show general info q : Show message numbers'#010+
  277. '# l : Show line','numbers c : Show conditionals'#010+
  278. '# a : Show everything 0 : Show nothing (except errors'+
  279. ')'#010+
  280. '# b : Write file names messages r : Rhide/GCC compatibility mod'+
  281. 'e'#010+
  282. '# with full path x : Executable i','nfo (Win32 on'+
  283. 'ly)'#010+
  284. '# v : write fpcdebug.txt with p : Write tree.log with parse t'+
  285. 'ree'#010+
  286. '# lots of debugging info'#010+
  287. '#'#010+
  288. '# Display Info, Warnings and Notes'#010+
  289. '-viwn'#010+
  290. '# If you don'#039't want so much verbosity use'#010+
  291. '#-vw'#010
  292. );