Welcome, Guest
Username: Password: Remember me
CodeTyphon Linux OS Development, discussions and problems
  • Page:
  • 1

TOPIC:

cross-compilation configuration 7 years 1 month ago #11030

  • Libaud
  • Libaud's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 23
  • Thank you received: 0
Hi,

The cross-compilation capacity of CT is very very interesting but be careful with the configuration of FPC, Typhon and the Widget.

I've made some research on to cross-compile the same project with multi-target widget (x86/x64 + QT4/5 or GTK).

The first problem I was confronted with the last release of CT is the configuration of fpc.cfg.
Because directory inclusion is not correct for my own system. I'm on Linux Mint 18.2 x64. And I use by default the gcc/g++ 7 stable release.
Compilation of FPC, typhon64/32 working correctly but fpc.cfg was not configured exactly as needed for cross compilation. It's the same with release 6 or 5 of gcc/g++. So be careful with your own configuration of gcc/g++. And check installation, the default release...

So I've configured the search libraries with that on fpc.cfg :

-Fl/usr/lib64
-Fl/usr/lib/x86_64-linux-gnu
-Fl/usr/lib/gcc/x86_64-linux-gnu/5
-Fl/usr/lib/gcc/x86_64-linux-gnu/6
-Fl/usr/lib/gcc/x86_64-linux-gnu/7
-Fl/usr/local/codetyphon/fpc/fpc64/units/$fpctarget
-Fl/usr/local/codetyphon/qt4pas/$fpctarget
-Fl/usr/local/codetyphon/qt5pas/$fpctarget
-Fl/usr/local/codetyphon/binLibraries/$fpctarget

and for have a correct cross-compilation for linux x86 :

# binutils prefix for cross compiling
#IFDEF FPC_CROSSCOMPILING
#IFDEF cpui386
-Fl/usr/lib/i386-linux-gnu
-Fl/usr/lib/gcc/x86_64-linux-gnu/5/32
-Fl/usr/lib/gcc/x86_64-linux-gnu/6/32
-Fl/usr/lib/gcc/x86_64-linux-gnu/7/32
-Fl/usr/local/codetyphon/fpc/fpc64/units/$fpctarget
-Fl/usr/local/codetyphon/qt4pas/$fpctarget
-Fl/usr/local/codetyphon/qt5pas/$fpctarget
-Fl/usr/local/codetyphon/binLibraries/$fpctarget
-FL/usr/local/codetyphon/binLibraries/$fpctarget/ld-linux-so.2
#ENDIF
#ENDIF

Note that I've remove the -XP$fpctarget- that it wasn't useful for me.

At start I said that I've made some tests for QT4/5 and GTK3 compilation/cross-compilation, because some projects of mind need that. I have saw that for CodeTyphon project (*.ctpr) it's not possible to have multi-widget configuration (QT4/5+GTK).
The best way is to a multi-project with a dedicated project for a specific widget add main.pas and other in all projects after. There's no difficulties with Windows target.
Frédéric Libaud, Digital Expert

Please Log in or Create an account to join the conversation.

  • Page:
  • 1