You can also retrieve the EXACT version of main trunk and including the revision.
This is like this for x86_64:
.section .fpc.n_version,"aw"
.balign 32
__fpc_ident:
.ascii "FPC 3.3.1-15198-g71a46465c8-dirty [2024/02/19] for "
.ascii "x86_64 - Win64"
This is not what you want in most cases, but I already posted how to retrieve this in pure Pascal.
Here is a slightly modified version I published a couple of years ago.
program testversion;
type
TCharArray = array [0..1023] of char; //arbitrary
var
__fpc_ident:TCharArray;external;
begin
writeln(__fpc_ident);
end.
These kind of tricks are not recommended!!!!
It shows the compiler version + the git + if I have modified it myself + compile date + platform.
It seems cross platform, works on Arm32 too.... and on Linux and Windows.
Do not use. A normal user does not need this.