[Lazarus] IDE Macro for # of bits of the Source OS? (eg. 32-bit/64-bit -- A $(SrcCPU) would be nice!)

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Jul 15 15:00:49 CEST 2014


On Tue, 15 Jul 2014 14:34:56 +0200
Sven Barth <pascaldragon at googlemail.com> wrote:

> Am 15.07.2014 12:23 schrieb "Mattias Gaertner" <nc-gaertnma at netcologne.de>:
> >
> > On Tue, 8 Jul 2014 12:07:46 +0200
> > Sven Barth <pascaldragon at googlemail.com> wrote:
> >
> > >[...]
> > > FPC automatically defines CPUxyz for -Cpxyz, but it seems that Lazarus
> > > passes -Opxyz instead which is the CPU type which is optimized for. I'd
> > > consider this an error of Lazarus...
> >
> > When should -Cp be used and when -Op?
> 
> -Cp sets the target processor. Especially important for platforms like ARM
> and m68k (additionally the corresponding CPU defines are set with this)
> -Op sets the processor for which to optimize. I don't know just now whether
> -Cp influences -Op, but the other way round is definitely not true.
> 
> So -Cp needs to be set always (if it isn't left blank), while -Op *can* be
> set.

Thanks for the explanation.
I changed the -Op to -Cp.

Mattias




More information about the Lazarus mailing list