[fpc-devel] defines by the compiler... / linux, LIBC, SysCall

Martin Frb lazarus at mfriebe.de
Thu Jan 11 18:02:11 CET 2024


On 11/01/2024 17:30, Marco van de Voort via fpc-devel wrote:
>
> Let me state it more clearly:
>
> The point is that given a precompiled Linux RTL, to my best knowledge  
> you can't test any define outside the FPC build environment to see if 
> the RTL was compiled with FPC_USE_LIBC or not. Maybe there is some 
> workaround testing for some symbol inside the system unit with{$if 
> defined(symbol}, but there is no supported global define to test.

Ok, kind of expected that


>
> Targets that enable libc by default (darwin, sunos and openbsd 
> apparently) by default make this work by locally enabling 
> FPC_USE_LIBC, usually both in rtl/$target or by other hacks in various 
> packages/ dirs for shared code, and simply not providing any 
> alternative in the target specific code.
>
> And to my best knowledge the "LIBC" in the extradefines of Slowaris 
> (below) means zip, nada, zilch. It is an artifact of 1.0.x times, 
> which is so old EVEN Lazarus doesn't support it :-)

Ok. ...

Now what I was hoping for, but....

- Darwin isn't a problem. As I test for that anyway.
- I can add {$IFDEF SUNOS} too
- Not sure which others...

Sadly however the list can change. So without "LIBC" or other such 
define, this is going to be tricky....





More information about the fpc-devel mailing list