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