fpc.cft 7.0 KB

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