fpccfg.inc 11 KB

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