Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-09

One project and many versions of FPC?

10 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I came across a message posted by Martin (developer of MSEide). He does exactly what I need to do, but I need to do it with Lazarus IDE. Having one project that must be compiled with various versions of FPC. Simple example is a app being distributed as 32-bit and 64-bit. Then there is also the case of using the stable released version of FPC vs the unstable "trunk" or stable "fixes" versions.

Is something like this possible with Lazarus? If so, how does one go about setting this up? Also see attached images for how it looks in MSEide. He has various custom "macro groups" and various build modes (6 of them: Make, Build, Custom1-4).

Is something like this at all possible with Lazarus IDE?

------------[ Martin's setup with MSEide ]----------------------- I use the following script to compile RTL and packages of a FPC SVN checkout with debuginfo:
"
#!/bin/sh
fpcdir=/home/mse/packs/standard/svn/fp/fixes_2_4
cd ${fpcdir}/packages
make clean
cd ${fpcdir}/rtl
make clean
cd ..
make OPT="-gl -O-" FPC=${fpcdir}/compiler/ppc386 rtl packages "
In .fpc.cfg there are ifdef'd sections of -Fu defines: "
#IFDEF svnfixes_2_4
-Fu/home/mse/packs/standard/svn/fp/fixes_2_4/rtl/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/fcl-base/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/fcl-image/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/fcl-db/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/pasjpeg/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/paszlib/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/hash/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/libc/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/ibase/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/odbc/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/postgres/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/sqlite/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/mysql/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/x11/units/$fpctarget #ELSE
#IFDEF svnfixes_2_2
-Fu/home/mse/packs/standard/svn/fp/fixes_2_2/rtl/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/fcl-base/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/fcl-image/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/fcl-db/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/pasjpeg/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/paszlib/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/hash/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/libc/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/ibase/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/odbc/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/postgres/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/sqlite/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/mysql/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/x11/units/$fpctarget #ELSE
# searchpath for units and other system dependent things -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/*
#ENDIF
#ENDIF
#ENDIF
"
In 'Project'-'Options'-'Macros' there are settings for different FPC versions which can be switched easy, see attachments.

-------------[ end ]-------------------------

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -------------- next part -------------- A non-text attachment was scrubbed... Name: makeoptions.png Type: image/png Size: 13977 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090917/9800c2f6/attachment-0002.png> -------------- next part -------------- A non-text attachment was scrubbed... Name: macros.png Type: image/png Size: 9245 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090917/9800c2f6/attachment-0003.png>

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 11 lines
Hi, I came across a message posted by Martin (developer of MSEide). He does exactly what I need to do, but I need to do it with Lazarus IDE. Having one project that must be compiled with various versions of FPC. Simple example is a app being distributed as 32-bit and 64-bit. Then there is also the case of using the stable released version of FPC vs the unstable "trunk" or stable "fixes" versions. Is something like this possible with Lazarus? If so, how does one go about setting this up?

The weapons are
- the fpc config fpc.cfg
- lazarus macros like $FPCVer, $TargetOS and $TargetCPU
- using lazarus command line parameter --pcp

The standard fpc.cfg is already suitable for multiple FPC versions. It uses FPC macros. So you can install for example fpc 2.2.4, 2.2.5 and 2.5.1. You switch between them by switching the compiler (/usr/lib/fpc/2.5.1/ppc386).

The fpc sources should correspond to the compiler. The lazarus option for the FPC source directory allows macros, especially the macro $FPCVer which resolves for example to 2.2.5. Put the three sources
under /home/username/pascal/2.5.1/fpc, /home/username/pascal/2.2.4/fpc, ... and set the source directory to /home/username/pascal/$FPCVer/fpc. Every time you switch the compiler, lazarus will automatically switch the source directory.

Show quoted text 5 lines
Also see attached images for how it looks in MSEide. He has various custom "macro groups" and various build modes (6 of them: Make, Build, Custom1-4). Is something like this at all possible with Lazarus IDE?

Build modes are started but I can't say when I will have the time to finish them.

------------[ Martin's setup with MSEide ]----------------------- I use the following script to compile RTL and packages of a FPC SVN checkout with debuginfo:

I recommend to use the FPC way of compiling FPC. Otherwise you can easily run into trouble that no one can reproduce.

Show quoted text 46 lines
[...] make OPT="-gl -O-" FPC=${fpcdir}/compiler/ppc386 rtl packages In .fpc.cfg there are ifdef'd sections of -Fu defines: " #IFDEF svnfixes_2_4 -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/rtl/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/fcl-base/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/fcl-image/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/fcl-db/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/pasjpeg/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/paszlib/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/hash/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/libc/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/ibase/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/odbc/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/postgres/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/sqlite/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/mysql/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_4/packages/x11/units/$fpctarget #ELSE #IFDEF svnfixes_2_2 -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/rtl/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/fcl-base/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/fcl-image/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/fcl-db/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/pasjpeg/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/paszlib/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/hash/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/libc/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/ibase/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/odbc/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/postgres/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/sqlite/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/mysql/units/$fpctarget -Fu/home/mse/packs/standard/svn/fp/fixes_2_2/packages/x11/units/$fpctarget #ELSE # searchpath for units and other system dependent things -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/* #ENDIF #ENDIF #ENDIF " In 'Project'-'Options'-'Macros' there are settings for different FPC versions which can be switched easy, see attachments.

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gaertner

Mattias Gaertner het geskryf:

The weapons are - the fpc config fpc.cfg - lazarus macros like $FPCVer, $TargetOS and $TargetCPU - using lazarus command line parameter --pcp

Thanks Mattias, this helps a lot.

Where does the command line parameter --pcp play a roll? Different shorcuts on the desktop with pre-configured FPC paths and compiler settings?

The fpc sources should correspond to the compiler. The lazarus option for the FPC source directory allows macros, especially the macro $FPCVer which resolves for example to 2.2.5.

Can we define our own "custom macros" in the IDE? What is the "CodeTools defines editor" used for? Is that maybe for custom macros?

and set the source directory to /home/username/pascal/$FPCVer/fpc.

Ah, I didn't know source directory supports macros. Another plus point for having Mantis report #14558 implemented. :-)
http://bugs.freepascal.org/view.php?id=14558

I recommend to use the FPC way of compiling FPC. Otherwise you can easily run into trouble that no one can reproduce.

Yeah, I think I do that correctly - not sure if it's the "fpc way" though.

--------[ /opt/fpc_2.3.1/go46.sh ]----------
cd src
make clean
make all PP=/opt/fpc_2.2.5/bin/ppcx64
make install INSTALL_PREFIX=/opt/fpc_2.3.1 PP=/opt/fpc_2.2.5/bin/ppcx64 ----------------[ end ]----------------

I have similar scripts for 32-bit compiler and unstable trunk. And I always use the FPC 2.2.5 stable release to build newer releases.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Mattias Gaertner: On Thu, 17 Sep 2009 14:39:54 +0200 The weapons are - the fpc config fpc.cfg - lazarus…

Mattias Gaertner het geskryf:

The fpc sources should correspond to the compiler. The lazarus option for the FPC source directory allows macros, especially the macro $FPCVer which resolves for example to 2.2.5. Put the three sources under /home/username/pascal/2.5.1/fpc,

I tried to use the $FPCVer macro inthe FPC Source Directory, but Lazarus IDE keeps giving me errors. I tried $FPCVer and $(FPCVer) and $(fpcver) etc... they all fail. As soon as I press the OK button to close the Environment Options dialog. See attached screenshot.

I'm using Lazarus "fixes 0.9.28" latest revision under Linux with GTK2.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -------------- next part -------------- A non-text attachment was scrubbed... Name: fpc_src_path_error.png Type: image/png Size: 7855 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090917/4a571b39/attachment.png>

Reply by email

Graeme Geldenhuys
to Marco van de Voort: Or by fpc -V and -P

Marco van de Voort het geskryf:

Or by fpc -V and -P

I fail to see how this helps? Also my FPC doesn't have a -V command line option, only -v<x> for verbose output.

And -T<x> is for the target operating system. eg: -Tlinux

How does this help if I have Linux, but FPC 2.2.5, 2.3.1 and 2.5.1 installed on Linux?

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Marco van de Voort
to Graeme Geldenhuys
Graeme Geldenhuys wrote 6 lines
Marco van de Voort het geskryf: > > Or by fpc -V and -P I fail to see how this helps? Also my FPC doesn't have a -V command line option, only -v<x> for verbose output.

The -V and -P options are nearly as old as the buildfaq. Any non ancient version should have them. They should be documented afaik, and are covered in the buildfaq.

And -T<x> is for the target operating system. eg: -Tlinux

That is a ppc386 parameter. I'm talking about fpc parameters.

-V is version (fpc -Vbla executes ppc<defaultarch>-bla) -P is arch (fpc -Pppc executes ppcppc)

How does this help if I have Linux, but FPC 2.2.5, 2.3.1 and 2.5.1 installed on Linux?

Simple. Make symlinks ppc386-2.2.5 ppc386-2.3.1 ppc386-2.5.1 and similarly ppcx64-2.2.5 etc to the respective compilers in $prefix/lib/fpc/...

Set up the -Fu in fpc.cfg properly by using $FPCVERSION and $FPCTARGET etc

and you can compile with

fpc -V2.2.5 -Px86_64 etc.

This is all original content (of the first version) of the buildfaq btw.

Reply by email

Graeme Geldenhuys
to Marco van de Voort

2009/9/17 Marco van de Voort :

The -V and -P options are nearly as old as the buildfaq. Any non ancient version should have them. They should be documented afaik, and are covered in the buildfaq.

All good an well, but the buildfaq is not an available option to download from the freepascal.org website.

http://www.freepascal.org/docs.var

Not to mention that -V is not listed in the "fpc -h" output as shown below. I tried FPC 2.2.5 and FPC 2.3.1 - both latest revisions available.

Also the help for -T<x> as listed below seems to be very different to what you are talking about. So no, it doesn't seem to be that obvious as you suggested. :-(

---------------[ exact console output ]------------------------------- $ ./fpc -h
Free Pascal Compiler version 2.2.5 [2009/04/05] for i386 Copyright (c) 1993-2008 by Florian Klaempfl
/opt/fpc_fixes_2.2/lib/fpc/2.2.5/ppc386 [options] <inputfile> [options] Put + after a boolean switch option to enable it, - to disable it -a The compiler doesn't delete the generated assembler file -al List sourcecode lines in assembler file -an List node info in assembler file
-ap Use pipes instead of creating temporary assembler files -ar List register allocation/release info in assembler file -at List temp allocation/release info in assembler file -A<x> Output format:
-Adefault Use default assembler
-Aas Assemble using GNU AS
-Anasmcoff COFF (Go32v2) file using Nasm
-Anasmelf ELF32 (Linux) file using Nasm
-Anasmwin32Win32 object file using Nasm
-AnasmwdosxWin32/WDOSX object file using Nasm
-Awasm Obj file using Wasm (Watcom)
-Anasmobj Obj file using Nasm
-Amasm Obj file using Masm (Microsoft)
-Atasm Obj file using Tasm (Borland)
-Aelf ELF (Linux) using internal writer
-Acoff COFF (Go32v2) using internal writer
-Apecoff PE-COFF (Win32) using internal writer
-b Generate browser info
-bl Generate local symbol info
-B Build all modules
-C<x> Code generation options:
-Cc<x> Set default calling convention to <x>
-CD Create also dynamic library (not supported) -Ce Compilation with emulated floating point opcodes -Cf<x> Select fpu instruction set to use, see fpc -i for possible values
-CF<x> Minimal floating point constant precision (default, 32, 64) -Cg Generate PIC code
-Ch<n> <n> bytes heap (between 1023 and 67107840) -Ci IO-checking
-Cn Omit linking stage
-Co Check overflow of integer operations
-CO Check for possible overflow of integer operations -Cp<x> Select instruction set, see fpc -i for possible values -CP<x>=<y> packing settings
-CPPACKSET=<y> <y> set allocation: 0, 1 or DEFAULT or NORMAL, 2, 4 and 8
-Cr Range checking
-CR Verify object method call validity
-Cs<n> Set stack size to <n>
-Ct Stack checking
-CX Create also smartlinked library
-d<x> Defines the symbol <x>
-D Generate a DEF file
-Dd<x> Set description to <x>
-Dv<x> Set DLL version to <x>
-e<x> Set path to executable
-E Same as -Cn
-fPIC Same as -Cg
-F<x> Set file names and paths:
-Fa<x>[,y] (for a program) load units <x> and [y] before uses is parsed -Fc<x> Set input codepage to <x>
-FC<x> Set RC compiler binary name to <x>
-FD<x> Set the directory where to search for compiler utilities -Fe<x> Redirect error output to <x>
-Ff<x> Add <x> to framework path (Darwin only) -FE<x> Set exe/unit output path to <x>
-Fi<x> Add <x> to include path
-Fl<x> Add <x> to library path
-FL<x> Use <x> as dynamic linker
-Fm<x> Load unicode conversion table from <x>.txt in the compiler dir -Fo<x> Add <x> to object path
-Fr<x> Load error message file <x>
-FR<x> Set resource (.res) linker to <x>
-Fu<x> Add <x> to unit path
-FU<x> Set unit output path to <x>, overrides -FE -g Generate debug information (default format for target) -gc Generate checks for pointers
-gh Use heaptrace unit (for memory leak/corruption debugging) -gl Use line info unit (show more info with backtraces) -go<x> Set debug information options
-godwarfsets Enable Dwarf set debug information (breaks gdb < 6.5) -gp Preserve case in stabs symbol names
-gs Generate stabs debug information
-gt Trash local variables (to detect uninitialized uses) -gv Generates programs traceable with valgrind -gw Generate dwarf-2 debug information (same as -gw2) -gw2 Generate dwarf-2 debug information
-gw3 Generate dwarf-3 debug information
-i Information
-iD Return compiler date
-iV Return short compiler version
-iW Return full compiler version
-iSO Return compiler OS
-iSP Return compiler host processor
-iTO Return target OS
-iTP Return target processor
-I<x> Add <x> to include path
-k<x> Pass <x> to the linker
-l Write logo
-M<x> Set language mode to <x>
-Mfpc Free Pascal dialect (default)
-Mobjfpc FPC mode with Object Pascal support
-Mdelphi Delphi 7 compatibility mode
-Mtp TP/BP 7.0 compatibility mode
-Mmacpas Macintosh Pascal dialects compatibility mode -n Do not read the default config files
-N<x> Node tree optimizations
-Nu Unroll loops
-o<x> Change the name of the executable produced to <x> -O<x> Optimizations:
-O- Disable optimizations
-O1 Level 1 optimizations (quick and debugger friendly) -O2 Level 2 optimizations (-O1 + quick optimizations) -O3 Level 3 optimizations (-O2 + slow optimizations) -Oa<x>=<y> Set alignment
-Oo[NO]<x> Enable or disable optimizations, see fpc -i for possible values -Op<x> Set target cpu for optimizing, see fpc -i for possible values -Os Optimize for size rather than speed
-pg Generate profile code for gprof (defines FPC_PROFILE) -R<x> Assembler reading style:
-Rdefault Use default assembler for target
-Ratt Read AT&T style assembler
-Rintel Read Intel style assembler
-S<x> Syntax options:
-S2 Same as -Mobjfpc
-Sc Support operators like C (*=,+=,/= and -=) -Sa Turn on assertions
-Sd Same as -Mdelphi
-Se<x> Error options. <x> is a combination of the following: <n> : Compiler halts after the <n> errors (default is 1) w : Compiler also halts after warnings
n : Compiler also halts after notes
h : Compiler also halts after hints
-Sg Enable LABEL and GOTO (default in -Mtp and -Mdelphi) -Sh Use ansistrings by default instead of shortstrings -Si Turn on inlining of procedures/functions declared as "inline" -Sk Load fpcylix unit
-SI<x> Set interface style to <x>
-SIcom COM compatible interface (default)
-SIcorba CORBA compatible interface
-Sm Support macros like C (global)
-So Same as -Mtp
-Ss Constructor name must be init (destructor must be done) -St Allow static keyword in objects
-Sx Enable exception keywords (default in Delphi/ObjFPC modes) -s Do not call assembler and linker
-sh Generate script to link on host
-st Generate script to link on target
-sr Skip register allocation phase (use with -alr) -T<x> Target operating system:
-Temx OS/2 via EMX (including EMX/RSX extender) -Tfreebsd FreeBSD
-Tgo32v2 Version 2 of DJ Delorie DOS extender
-Tlinux Linux
-Tnetbsd NetBSD
-Tnetware Novell Netware Module (clib)
-Tnetwlibc Novell Netware Module (libc)
-Topenbsd OpenBSD
-Tos2 OS/2 / eComStation
-Tsunos SunOS/Solaris
-Tsymbian Symbian OS
-Twatcom Watcom compatible DOS extender
-Twdosx WDOSX DOS extender
-Twin32 Windows 32 Bit
-Twince Windows CE
-u<x> Undefines the symbol <x>
-U Unit options:
-Un Do not check where the unit name matches the file name -Ur Generate release unit files (never automatically recompiled) -Us Compile a system unit
-v<x> Be verbose. <x> is a combination of the following letters: e : Show errors (default) 0 : Show nothing (except errors) w : Show warnings u : Show unit info n : Show notes t : Show tried/used files h : Show hints c : Show conditionals i : Show general info d : Show debug info l : Show linenumbers r : Rhide/GCC compatibility mode a : Show everything x : Executable info (Win32 only) b : Write file names messages with full path
v : Write fpcdebug.txt with p : Write tree.log with parse tree lots of debugging info
-W<x> Target-specific options (targets)
-Wb Create a bundle instead of a library (Darwin) -WB Create a relocatable image (Windows)
-WC Specify console type application (EMX, OS/2, Windows) -WD Use DEFFILE to export functions of DLL or EXE (Windows) -WF Specify full-screen type application (EMX, OS/2) -WG Specify graphic type application (EMX, OS/2, Windows) -WN Do not generate relocation code, needed for debugging (Windows) -WR Generate relocation code (Windows)
-X Executable options:
-Xc Pass --shared/-dynamic to the linker (BeOS, Darwin, FreeBSD, Linux)
-Xd Do not use standard library search path (needed for cross compile)
-Xe Use external linker
-Xg Create debuginfo in a separate file and add a debuglink section to executable
-XD Try to link units dynamically (defines FPC_LINK_DYNAMIC) -Xi Use internal linker
-Xm Generate link map
-XM<x> Set the name of the 'main' program routine (default is 'main') -XP<x> Prepend the binutils names with the prefix <x> -Xr<x> Set library search path to <x> (needed for cross compile) (BeOS, Linux)
-XR<x> Prepend <x> to all linker search paths (BeOS, Darwin, FreeBSD, Linux, Mac OS, Solaris)
-Xs Strip all symbols from executable
-XS Try to link units statically (default, defines FPC_LINK_STATIC) -Xt Link with static libraries (-static is passed to linker) -XX Try to smartlink units (defines FPC_LINK_SMART)

-? Show this help
-h Shows this help without waiting
------------------------------------------------------------

> And -T<x> is for the target operating system. eg: -Tlinux That is a ppc386 parameter. I'm talking about fpc parameters.

I typed the following to get the above output:

$ fpc -h

What's the difference between 'fpc' and 'ppcXXX'...? I assumed 'fpc' it's some symlink or alias to your platform's real pppXXX binary.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys

2009/9/17 Graeme Geldenhuys :

Show quoted text 10 lines
2009/9/17 Marco van de Voort : > > The -V and -P options are nearly as old as the buildfaq. Any non ancient > version should have them. They should be documented afaik, and are covered > in the buildfaq. All good an well, but the buildfaq is not an available option to download from the freepascal.org website. ?http://www.freepascal.org/docs.var

Doing a Google search I managed to find it. If it is such an important document, why is it not available with all the other FPC documentation? Could somebody please add it to the list of documentation for download.

The link Google return - for everyone else looking for it.

http://www.stack.nl/~marcov/buildfaq.pdf

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Mattias Gaertner
to Graeme Geldenhuys: Mattias Gaertner het geskryf: I tried to use the $FPCVer macro inthe FPC Source…
Show quoted text 11 lines
Mattias Gaertner het geskryf: > The fpc sources should correspond to the compiler. The lazarus > option for the FPC source directory allows macros, especially the > macro $FPCVer which resolves for example to 2.2.5. Put the three > sources under /home/username/pascal/2.5.1/fpc, I tried to use the $FPCVer macro inthe FPC Source Directory, but Lazarus IDE keeps giving me errors. I tried $FPCVer and $(FPCVer) and $(fpcver) etc... they all fail. As soon as I press the OK button to close the Environment Options dialog. See attached screenshot.

Fixed in 21751.

$(FPCVer)

I'm using Lazarus "fixes 0.9.28" latest revision under Linux with GTK2.

Vincent, can you merge this revision?

I also removed an old IFNDEF VER2_2_0.

Mattias

Reply by email