Recent

Author Topic: [Solved] How to set up project with multiple cross compilers?  (Read 5826 times)

Pascal

  • Hero Member
  • *****
  • Posts: 932
[Solved] How to set up project with multiple cross compilers?
« on: October 17, 2018, 01:25:04 pm »
How can i set up a project where each build mode uses a different compiler (cross compiling)?
« Last Edit: October 17, 2018, 08:48:03 pm by Pascal »
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

heejit

  • Full Member
  • ***
  • Posts: 245
Re: How to set up project with multiple cross compilers?
« Reply #1 on: October 17, 2018, 03:24:22 pm »
It is very easy with fpcupdeluxe

https://github.com/newpascal/fpcupdeluxe/releases

I am using it to crosscomplie from Linux -> Win64

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: How to set up project with multiple cross compilers?
« Reply #2 on: October 17, 2018, 03:43:45 pm »
Sorry, that's not what i wanted to know.

How do i set up one Lazarus project with two build modes, where each mode uses a different compiler.
The compiler is set for all projects in the lazarus options atm.
« Last Edit: October 17, 2018, 03:45:21 pm by Pascal »
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: How to set up project with multiple cross compilers?
« Reply #3 on: October 17, 2018, 04:17:01 pm »
I have never tried it but, can't you change the compiler in the project options? (Project Options -> Compiler Commands -> Compiler)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: How to set up project with multiple cross compilers?
« Reply #4 on: October 17, 2018, 04:36:58 pm »
How can i set up a project where each build mode uses a different compiler (cross compiling)?

Go to "Project options" -> Compiler options -> Build modes (it's on top of form), click speed button and add new build mode, in such mode you can choose different CPU (Config and Target), different name of output binary (Paths- > Target file name, also you can choose different widgetset via "Additions and overrides"

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: How to set up project with multiple cross compilers?
« Reply #5 on: October 17, 2018, 08:31:09 pm »
How can i set up a project where each build mode uses a different compiler (cross compiling)?

Go to "Project options" -> Compiler options -> Build modes (it's on top of form), click speed button and add new build mode, in such mode you can choose different CPU (Config and Target), different name of output binary (Paths- > Target file name, also you can choose different widgetset via "Additions and overrides"

I know this! but all of this is done with the compiler set in Lazarus options.
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: How to set up project with multiple cross compilers?
« Reply #6 on: October 17, 2018, 08:32:08 pm »
I have never tried it but, can't you change the compiler in the project options? (Project Options -> Compiler Commands -> Compiler)

Right, thanks, that does the job! Stupid me %)
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Pascal

  • Hero Member
  • *****
  • Posts: 932
Re: How to set up project with multiple cross compilers?
« Reply #7 on: October 17, 2018, 08:54:47 pm »
How can i set up a project where each build mode uses a different compiler (cross compiling)?

Go to "Project options" -> Compiler options -> Build modes (it's on top of form), click speed button and add new build mode, in such mode you can choose different CPU (Config and Target), different name of output binary (Paths- > Target file name, also you can choose different widgetset via "Additions and overrides"

I know this! but all of this is done with the compiler set in Lazarus options.

You get this if the target does not match:
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: How to set up project with multiple cross compilers?
« Reply #8 on: November 11, 2018, 06:16:07 am »
I have never tried it but, can't you change the compiler in the project options? (Project Options -> Compiler Commands -> Compiler)

Right, thanks, that does the job! Stupid me %)


It took me a while to find that there, but I've been loving it since I found it.

Now I can use:  "Run --> Compile Many Modes" to quickly generate x32 and x64 binaries

-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

 

TinyPortal © 2005-2018