fpc.cft 7.2 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. #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. # searchpath for units and other system dependent things
  128. -Fu%basepath%/units/$fpctarget
  129. -Fu%basepath%/units/$fpctarget/*
  130. -Fu%basepath%/units/$fpctarget/rtl
  131. #ifdef cpui8086
  132. -Fu%basepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel
  133. -Fu%basepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/*
  134. -Fu%basepath%/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/rtl
  135. #endif
  136. #IFDEF FPCAPACHE_1_3
  137. -Fu%basepath%/units/$fpctarget/httpd13/
  138. #ELSE
  139. #IFDEF FPCAPACHE_2_0
  140. -Fu%basepath%/units/$fpctarget/httpd20
  141. #ELSE
  142. -Fu%basepath%/units/$fpctarget/httpd22
  143. #ENDIF
  144. #ENDIF
  145. # searchpath for fppkg user-specific packages
  146. -Fu%localbasepath%/units/$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. # searchpath for tools
  154. -FD%basepath%/bin/$FPCTARGET
  155. %NEEDCROSSBINUTILSIFDEF%
  156. # never need cross-prefix when targeting the JVM
  157. # (no native compiler, always cross-compiling)
  158. #ifdef cpujvm
  159. #undef NEEDCROSSBINUTILS
  160. #endif
  161. # for android cross-prefix is set by compiler
  162. #ifdef android
  163. #undef NEEDCROSSBINUTILS
  164. #endif
  165. # never need cross-prefix when targeting the i8086
  166. # (no native compiler, always cross-compiling)
  167. #ifdef cpui8086
  168. #undef NEEDCROSSBINUTILS
  169. #endif
  170. # never need cross-prefix when targeting the i8086
  171. # (no native compiler, always cross-compiling)
  172. #ifdef cpujvm
  173. #undef NEEDCROSSBINUTILS
  174. #endif
  175. # binutils prefix for cross compiling
  176. #IFDEF FPC_CROSSCOMPILING
  177. #IFDEF NEEDCROSSBINUTILS
  178. -XP$FPCTARGET-
  179. #ENDIF
  180. #ENDIF
  181. # -------------
  182. # Linking
  183. # -------------
  184. # generate always debugging information for GDB (slows down the compiling
  185. # process)
  186. # -gc generate checks for pointers
  187. # -gd use dbx
  188. # -gg use gsym
  189. # -gh use heap trace unit (for memory leak debugging)
  190. # -gl use line info unit to show more info for backtraces
  191. # -gv generates programs tracable with valgrind
  192. # -gw generate dwarf debugging info
  193. #
  194. # Enable debuginfo and use the line info unit by default
  195. #-gl
  196. # always pass an option to the linker
  197. #-k-s
  198. # Always strip debuginfo from the executable
  199. -Xs
  200. # Always use smartlinking on i8086, because the system unit exceeds the 64kb
  201. # code limit
  202. #ifdef cpui8086
  203. -CX
  204. -XX
  205. #endif
  206. # -------------
  207. # Miscellaneous
  208. # -------------
  209. # Write always a nice FPC logo ;)
  210. -l
  211. # Verbosity
  212. # e : Show errors (default) d : Show debug info
  213. # w : Show warnings u : Show unit info
  214. # n : Show notes t : Show tried/used files
  215. # h : Show hints s : Show time stamps
  216. # i : Show general info q : Show message numbers
  217. # l : Show linenumbers c : Show conditionals
  218. # a : Show everything 0 : Show nothing (except errors)
  219. # b : Write file names messages r : Rhide/GCC compatibility mode
  220. # with full path x : Executable info (Win32 only)
  221. # v : write fpcdebug.txt with p : Write tree.log with parse tree
  222. # lots of debugging info
  223. #
  224. # Display Info, Warnings and Notes
  225. -viwn
  226. # If you don't want so much verbosity use
  227. #-vw