[Lazarus] Cross compiling LCL win32=>win64; update wiki?

Sven Barth pascaldragon at googlemail.com
Sun Feb 19 11:13:31 CET 2012


Am 19.02.2012 07:23 schrieb "Reinier Olislagers" <
reinierolislagers at gmail.com>:
>
> Hi list,
>
> I'm trying to cross compile LCL to win64 so users of fpcup can generate
> both x86 and x64 binaries.
>
> The wiki [1] says to check your compiler, e.g. with fpc -Twin64 -Px86_64
> test.pas. This works.
> Then: using the IDE:
>    Open Tools / Configure Build Lazarus / Advanced Build Options.
>    Set Target OS and Target CPU.
>    Set LCL and Package registration to Build (the middle radio button)
> and all other to None (left radio buttons).
>    Click the Build button.

Note: this doesn't describe the situation in trunk anymore.

> The Build FAQ says that make clean/distclean only works for the
> architecture you indicate. So a make clean or distclean for win64/x86_64
> seems advisable in order to clean up anything left over from previous
> attempts.
>
> 1) Does the above translate in a makefile like this:
> make distclean LCL_PLATFORM=win64 CPU_TARGET=x86_64 OS_TARGET=win64
> (this wouldn't interfere with my existing 32 bit LCL and IDE, would it?)
>
> make packager/registration lazutils lcl LCL_PLATFORM=win64
> CPU_TARGET=x86_64 OS_TARGET=win64
>

AFAIK this should be LCL_PLATFORM=win32 as the code is shared with the
win32 platform (and no, they won't interfere with eachother)

> 3) Unrelated... I can take this to the FPC list as well..
> The FPC manual, chapter 5 on -Txxx, says you can find out supported
> compilers using -i; for me (FPC 2.7.1):
> cd \development\fpc
> fpc -i
> it shows e.g. Win32 for i386, but not win64.
> However, calling ppcrossx64 -i does show Win64 for x64.
> 2 questions:
> 3.1) Am I interpreting the docs incorrectly? I thought fpc would spit
> out the info for all compilers it has in its directory.

You are interpreting this correctly. Using -P you tell the fpc binary which
compiler to call which will inturn print it's info (it's the same output
you'd achieve if you'd call the ppc* binary with -i yourself). This is by
design (note: calling fpc without -P will simply call the default compiler
binary for the platform fpc was compiled for)

> 3.2) How do I go from the description, e.g. "OS/2 via EMX" to the
> required -T setting, e.g. -Tos2?

It might be better to call FPC with -h then and fetch all lines starting
with -T (this has the same platform restrictions as the -i variant)

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120219/32924966/attachment-0003.html>


More information about the Lazarus mailing list