Not.
Except something like this:
var
Identity:array[0..1023] of AnsiChar external name '__fpc_ident';
begin
writeln(identity);
end.
Outputs in my case (differs, this one is compiled to include the git commit hash):
FPC 3.3.1-20084-g600dcc82f4 [2026/04/18] for x86_64 - Win64
This gives you: compiler version, target processor and target OS.
What's wrong with Macro's??? Macro's don't usually generate code.
Lazarus may have some code, though, but I think they use the same as I do.