fpc.cft 7.2 KB

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