[fpc-devel] $FPCTARGET macro and friends

Tomas Hajny XHajT03 at hajny.biz
Thu Dec 4 00:04:50 CET 2014

On 3 Dec 14, at 16:38, waldo kitty wrote:

> i'm trying to figure out the macros to have FP search for and output files in
>    i386-win32
>    i386-os2
>    i386-linux
> and similar... i had thought that $FPCTARGETCPU-$FPCTARGETOS would work but 
> apparently not... so, without hardcoding them, how can i have FP use the same 
> directories that Lazarus uses?

Under which (host) operating system does that FP run? The OS/2 
compiler and IDE (and Makefiles, etc.) are configured to use shorter 
version of the $FPCTARGET macro (only the target OS without the CPU 
platform), because on one hand, OS/2 isn't supported on multiple CPU 
types anyway, on the other hand, this allows compilation also on OS/2 
installations using FAT drives (i.e. without LFN) and also e.g. 
assembling and linking of programs compiled for the GO32v2 target 
using the GO32v2 as.exe and ld.exe under OS/2 (which wouldn't be 
possible otherwise, because they wouldn't see directories with long 
names under OS/2).

I'd be interested to understand the particular scenario you want to 
cover. As an example, if you e.g. access some shared network drive 
with your sources from multiple operating systems and want to use one 
installation of e.g. the OS/2 files used for all of Linux, Win32 and 
OS/2, you could set up symlinks (Linux) / junctions (MS Windows) on 
the file server so that 'i386-os2' used on one platform points to the 
same physical place as 'os2' used by the OS/2 installation. Note that 
this scenario is not officially supported by FPC (although workable 
with the minimum effort outlined above).


More information about the fpc-devel mailing list