[fpc-devel] 32 and 64 bit fpc.cfg file
    Peter Vreman 
    peter at freepascal.org
       
    Wed Jun 25 12:44:13 CEST 2008
    
    
  
Joost van der Sluis wrote:
> Hi all,
> 
> On Fedora 64-bit libraries are installed in /usr/lib64 and 32 bit
> libraries are in /usr/lib. The fedora fpc-packages also use these
> directories. The fpc.cfg file contains the following:
> 
> # 32-bits
> -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget
> -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/*
> -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/rtl
> # 64-bits
> -Fu/usr/lib64/fpc/$fpcversion/units/$fpctarget
> -Fu/usr/lib64/fpc/$fpcversion/units/$fpctarget/*
> -Fu/usr/lib64/fpc/$fpcversion/units/$fpctarget/rtl
> 
> This works, but is not ideal offcourse. Is there a way to detect if the
> compiler is 32 or 64 bit in the fpc.cfg file? So that it's possible to
> define these options depending on compiling for 32 or 64 bit?
You can use:
#ifdef CPU64
-Fu/usr/lib64/fpc/$fpcversion/units/$fpctarget
...
#else
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget
#endif
    
    
More information about the fpc-devel
mailing list