Recent

Author Topic: fpc 64b bundled with Lazarus  (Read 376 times)

igitur

  • Newbie
  • Posts: 1
fpc 64b bundled with Lazarus
« on: June 11, 2025, 02:44:53 pm »
Hi all,

I'm a bit new to the project, so bear with me.

I understand from https://www.freepascal.org/down/x86_64/win64-canada.var that there is no specific fpc distribution to generate Win64 binaries and that I should install the cross-compiler. I've done that and it works. Great.

But if I install Lazarus v4 (using scoop package manager, btw) and inspect the bundled FreePascal compiler directory, it doesn't look like that is the case there. I end up with a lazarus\4.0\fpc\3.2.2\bin\x86_64-win64\ directory, which contains fpc.exe, but not ppcrossx64.exe. The fpc.exe doesn't match the file size that is included in the standalone fpc distribution. It really looks like it's a proper win64 compiler. Am I missing something here and if I'm right, where can I get hold of this fpc compiler as a standalone?

thanks
Francois
Windows 10 64b

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11443
  • Debugger - SynEdit - and more
    • wiki
Re: fpc 64b bundled with Lazarus
« Reply #1 on: June 11, 2025, 04:00:33 pm »
I don't know the release policy of the fpc team for the compiler.

The Lazarus distro contains a native 3.2.2 fpc win-64 compiler.
However, indeed that compiler was not build by the fpc team. It was build from the sources that are tagged 3.2.2 in the fpc git repo, and build directly for the Lazarus distro.
It should otherwise be the same.

Though there may be slight differences in the flags used to build it (and the RTL). See the file lazarus\tools\install\win\build-fpc.bat in the Lazarus distro.
It specifies -CX -XX -Xs for some parts of the fpc build, which I don't know if they are on by default. (That is for smart linking)




A possible (though maybe not / I don't know if...) advantage of the Lazarus build is that the fpc.exe and ppc___.exe are code signed. Maybe (or maybe not) that appeases Windows Defender?

In the past, I have seen Windows Defender become suspicious if a project was recompiled several times in a short time, resulting in a constantly changing target exe. (Which the Defender would then delete...). I don't have enough data to determine if that is less likely now.




Mind you, with the Lazarus distro you will also find cross compilers. Including a cross compiler that builds 32bit exe. (64 to 32 bit).

That actually does not exist, because a 64 bit executable can (on Windows) not (safely) perform extended float. But building a 32 bit exe, requires support for extended.

That cross compiler is actually a native 32bit compiler, but disguised as cross compiler, so the IDE can call it as such.
« Last Edit: June 11, 2025, 04:06:47 pm by Martin_fr »

 

TinyPortal © 2005-2018