[Lazarus] Custom OS/CPU targets for FPC - build help

David Unric dunric29a at gmail.com
Tue Jan 3 15:55:58 CET 2012


Thx Vincent,

by supplying -P switch to fpc, I can finally produce x86_64 executables.
I'm surprised this switch is not mentioned in interactive help (fpc -? or
-h).
Why compiler fails when supplied with documented -T<target os> option ?
>fpc -Twin64 consoleapp.dpr
Error: Illegal parameter: -Twin64
Error: c:\Lazarus\fpc\2.7.1\bin\i386-win32\ppc386.exe returned an error
exitcode
 (normal if you did not specify a source file to be compiled)

Lazarus 0.9.31 seems to do not use -P option as it still produces i386 code
even if target CPU family is set to x86_64 in Project options and exe is
rebuilt from scratch (console app).

I'd like to ask somebody to shed some light on this subjects:
1) why supplying target OS option (-T) fails ? If I'd like to build win64
exe on win32 system have I pass CPU Target and fpc "automagically" selects
appropriate OS Target ?
2) How to tweak Lazarus so I can simply switch between win32/win64 targets ?

I'd appreciate any hint.

David




On Tue, Jan 3, 2012 at 1:52 PM, Vincent Snijders <vincent.snijders at gmail.com
> wrote:

> 2012/1/3 David Unric <dunric29a at gmail.com>:
> > The question is about including another target in fpc compiler so I need
> not
> > to call separate cross-compiler.
>
> If you installed the cross compiler correctly, you can use fpc
> -Px86_64, which will call the cross compiler.
>
> Vincent
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120103/f462b776/attachment-0003.html>


More information about the Lazarus mailing list