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.
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
If so, I'll update the wiki with a note on building the LCL using the command line.
2) If I wanted to have an IDE as well, could I just build make distclean bigide with those options?
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. 3.2) How do I go from the description, e.g. "OS/2 via EMX" to the required -T setting, e.g. -Tos2?
Note: I'm currently misusing a command like
lazbuild --cpu=x86_64 --operating-system==win64 --widgetset=win32 --build-all --build-ide-options=
to get a 64 bit IDE/LCL, then doing the same but for i386/win32 to return to a 32 bit IDE.
Seems to work but also like a bit of overkill ;)
Thanks,
Reinier
[1]
http://wiki.lazarus.freepascal.org/Cross_compiling#Cross_compiling_the_LCL
