fpc.cft 7.1 KB

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