3193f12
#
3193f12
# Config file generated by fpcmkcfg on %BUILDDATE% - %BUILDTIME%
3193f12
# Example fpc.cfg for Free Pascal Compiler
3193f12
#
3193f12
3193f12
# ----------------------
3193f12
# Defines (preprocessor)
3193f12
# ----------------------
3193f12
3193f12
#
3193f12
# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed
3193f12
#
3193f12
# -d is the same as #DEFINE
3193f12
# -u is the same as #UNDEF
3193f12
#
3193f12
3193f12
#
3193f12
# Some examples (for switches see below, and the -? helppages)
3193f12
#
3193f12
# Try compiling with the -dRELEASE or -dDEBUG on the commandline
3193f12
#
3193f12
3193f12
# For a release compile with optimizes and strip debuginfo
3193f12
#IFDEF RELEASE
3193f12
  -O2
3193f12
  -Xs
3193f12
  #WRITE Compiling Release Version
3193f12
#ENDIF
3193f12
3193f12
# For a debug version compile with debuginfo and all codegeneration checks on
3193f12
#IFDEF DEBUG
3193f12
  -gl
3193f12
  -Crtoi
3193f12
  #WRITE Compiling Debug Version
3193f12
#ENDIF
3193f12
3193f12
# assembling
3193f12
#ifdef darwin
3193f12
# use pipes instead of temporary files for assembling
3193f12
-ap
3193f12
#endif
3193f12
3193f12
# ----------------
3193f12
# Parsing switches
3193f12
# ----------------
3193f12
3193f12
# Pascal language mode
3193f12
#      -Mfpc      free pascal dialect (default)
3193f12
#      -Mobjfpc   switch some Delphi 2 extensions on
3193f12
#      -Mdelphi   tries to be Delphi compatible
3193f12
#      -Mtp       tries to be TP/BP 7.0 compatible
3193f12
#      -Mgpc      tries to be gpc compatible
3193f12
#      -Mmacpas   tries to be compatible to the macintosh pascal dialects
3193f12
#
3193f12
# Turn on Object Pascal extensions by default
3193f12
#-Mobjfpc
3193f12
3193f12
# Assembler reader mode
3193f12
#      -Rdefault  use default assembler
3193f12
#      -Ratt      read AT&T style assembler
3193f12
#      -Rintel    read Intel style assembler
3193f12
#
3193f12
# All assembler blocks are AT&T styled by default
3193f12
#-Ratt
3193f12
3193f12
# Semantic checking
3193f12
#      -S2        same as -Mobjfpc
3193f12
#      -Sc        supports operators like C (*=,+=,/= and -=)
3193f12
#      -Sa        include assertion code.
3193f12
#      -Sd        same as -Mdelphi
3193f12
#      -Se<x>     error options. <x> is a combination of the following:
3193f12
#         <n> : compiler stops after <n> errors (default is 1)
3193f12
#         w   : compiler stops also after warnings
3193f12
#         n   : compiler stops also after notes
3193f12
#         h   : compiler stops also after hints
3193f12
#      -Sg        allow LABEL and GOTO
3193f12
#      -Sh        Use ansistrings
3193f12
#      -Si        support C++ styled INLINE
3193f12
#      -Sk        load fpcylix unit
3193f12
#      -SI<x>     set interface style to <x>
3193f12
#         -SIcom    COM compatible interface (default)
3193f12
#         -SIcorba  CORBA compatible interface
3193f12
#      -Sm        support macros like C (global)
3193f12
#      -So        same as -Mtp
3193f12
#      -Sp        same as -Mgpc
3193f12
#      -Ss        constructor name must be init (destructor must be done)
3193f12
#      -Sx        enable exception keywords (default in Delphi/ObjFPC modes)
3193f12
#
3193f12
# Allow goto, inline, C-operators, C-vars
3193f12
-Sgic
3193f12
3193f12
# ---------------
3193f12
# Code generation
3193f12
# ---------------
3193f12
3193f12
# Uncomment the next line if you always want static/dynamic units by default
3193f12
# (can be overruled with -CD, -CS at the commandline)
3193f12
#-CS
3193f12
#-CD
3193f12
3193f12
# Set the default heapsize to 8Mb
3193f12
#-Ch8000000
3193f12
3193f12
# Set default codegeneration checks (iocheck, overflow, range, stack)
3193f12
#-Ci
3193f12
#-Co
3193f12
#-Cr
3193f12
#-Ct
3193f12
3193f12
# Optimizer switches
3193f12
# -Os        generate smaller code
3193f12
# -Oa=N      set alignment to N
3193f12
# -O1        level 1 optimizations (quick optimizations, debuggable)
3193f12
# -O2        level 2 optimizations (-O1 + optimizations which make debugging more difficult)
3193f12
# -O3        level 3 optimizations (-O2 + optimizations which also may make the program slower rather than faster)
3193f12
# -Oo<x>     switch on optimalization x. See fpc -i for possible values
3193f12
# -OoNO<x>   switch off optimalization x. See fpc -i for possible values
3193f12
# -Op<x>     set target cpu for optimizing, see fpc -i for possible values
3193f12
3193f12
#ifdef darwin
3193f12
#ifdef cpui386
3193f12
-Cppentiumm
3193f12
-Oppentiumm
3193f12
#endif
3193f12
#endif
3193f12
3193f12
# -----------------------
3193f12
# Use BuildId by default
3193f12
# -----------------------
3193f12
-k--build-id
3193f12
3193f12
# -----------------------
3193f12
# Set Filenames and Paths
3193f12
# -----------------------
3193f12
3193f12
# Both slashes and backslashes are allowed in paths
3193f12
3193f12
# path to the messagefile, not necessary anymore but can be used to override
3193f12
# the default language
3193f12
#-Fr%basepath%/lib/fpc/$fpcversion/msg/errore.msg
3193f12
#-Fr%basepath%/lib/fpc/$fpcversion/msg/errorn.msg
3193f12
#-Fr%basepath%/lib/fpc/$fpcversion/msg/errores.msg
3193f12
#-Fr%basepath%/lib/fpc/$fpcversion/errord.msg
3193f12
#-Fr%basepath%/lib/fpc/$fpcversion/errorr.msg
3193f12
3193f12
# searchpath for units and other system dependent things
3193f12
#IFDEF CPU64
3193f12
-Fu%basepath%/lib64/fpc/$fpcversion/units/$fpctarget
3193f12
-Fu%basepath%/lib64/fpc/$fpcversion/units/$fpctarget/*
3193f12
-Fu%basepath%/lib64/fpc/$fpcversion/units/$fpctarget/rtl
3193f12
#ELSE
3193f12
-Fu%basepath%/lib/fpc/$fpcversion/units/$fpctarget
3193f12
-Fu%basepath%/lib/fpc/$fpcversion/units/$fpctarget/*
3193f12
-Fu%basepath%/lib/fpc/$fpcversion/units/$fpctarget/rtl
3193f12
#ENDIF
3193f12
3193f12
#IFDEF FPCAPACHE_1_3
3193f12
#IFDEF CPU64
3193f12
-Fu%basepath%/lib64/fpc/$fpcversion/units/$fpctarget/httpd13/
3193f12
#ELSE
3193f12
-Fu%basepath%/lib/fpc/$fpcversion/units/$fpctarget/httpd13/
3193f12
#ENDIF
3193f12
#ELSE
3193f12
#IFDEF FPCAPACHE_2_0
3193f12
#IFDEF CPU64
3193f12
-Fu%basepath%/lib64/fpc/$fpcversion/units/$fpctarget/httpd20/
3193f12
#ELSE
3193f12
-Fu%basepath%/lib/fpc/$fpcversion/units/$fpctarget/httpd20/
3193f12
#ENDIF
3193f12
#ELSE
3193f12
#IFDEF CPU64
3193f12
-Fu%basepath%/lib64/fpc/$fpcversion/units/$fpctarget/httpd22/
3193f12
#ELSE
3193f12
-Fu%basepath%/lib/fpc/$fpcversion/units/$fpctarget/httpd22/
3193f12
#ENDIF
3193f12
#ENDIF
3193f12
#ENDIF
3193f12
3193f12
# searchpath for fppkg user-specific packages
3193f12
-Fu%localbasepath%/units/$FPCTARGET/*
3193f12
3193f12
# path to the gcclib
3193f12
%gcclibpath%
3193f12
3193f12
# searchpath for libraries
3193f12
#-Fl%basepath%/lib/fpc/$fpcversion/lib
3193f12
#-Fl/lib;/usr/lib
3193f12
3193f12
# searchpath for tools
3193f12
#IFDEF CPU64
3193f12
-FD%basepath%/lib64/fpc/$fpcversion/bin/$FPCTARGET
3193f12
#ELSE
3193f12
-FD%basepath%/lib/fpc/$fpcversion/bin/$FPCTARGET
3193f12
#ENDIF
3193f12
3193f12
%NEEDCROSSBINUTILSIFDEF%
3193f12
3193f12
# binutils prefix for cross compiling
3193f12
#IFDEF FPC_CROSSCOMPILING
3193f12
#IFDEF NEEDCROSSBINUTILS
3193f12
  -XP$FPCTARGET-
3193f12
#ENDIF
3193f12
#ENDIF
3193f12
3193f12
3193f12
# -------------
3193f12
# Linking
3193f12
# -------------
3193f12
3193f12
# generate always debugging information for GDB (slows down the compiling
3193f12
# process)
3193f12
#      -gc        generate checks for pointers
3193f12
#      -gd        use dbx
3193f12
#      -gg        use gsym
3193f12
#      -gh        use heap trace unit (for memory leak debugging)
3193f12
#      -gl        use line info unit to show more info for backtraces
3193f12
#      -gv        generates programs tracable with valgrind
3193f12
#      -gw        generate dwarf debugging info
3193f12
#
3193f12
# Enable debuginfo and use the line info unit by default
3193f12
#-gl
3193f12
3193f12
# always pass an option to the linker
3193f12
#-k-s
3193f12
3193f12
# Always strip debuginfo from the executable
3193f12
-Xs
3193f12
3193f12
3193f12
# -------------
3193f12
# Miscellaneous
3193f12
# -------------
3193f12
3193f12
# Write always a nice FPC logo ;)
3193f12
-l
3193f12
3193f12
# Verbosity
3193f12
#      e : Show errors (default)       d : Show debug info
3193f12
#      w : Show warnings               u : Show unit info
3193f12
#      n : Show notes                  t : Show tried/used files
3193f12
#      h : Show hints                  s : Show time stamps
3193f12
#      i : Show general info           q : Show message numbers
3193f12
#      l : Show linenumbers            c : Show conditionals
3193f12
#      a : Show everything             0 : Show nothing (except errors)
3193f12
#      b : Write file names messages   r : Rhide/GCC compatibility mode
3193f12
#          with full path              x : Executable info (Win32 only)
3193f12
#      v : write fpcdebug.txt with     p : Write tree.log with parse tree
3193f12
#          lots of debugging info
3193f12
#
3193f12
# Display Info, Warnings and Notes
3193f12
-viwn
3193f12
# If you don't want so much verbosity use
3193f12
#-vw