[Lazarus] Conditional Defines for Raspberry PI?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Conditional Defines for Raspberry PI?

Donald Ziesig
Hi Everyone!

Are there any conditional defines that let me exclude PI-specific code
when compiling for 64-bit amd linux (or vice-versa)?

I can define my own if necessary, but that is one more thing to worry
about when switching machines.

Thanks,

Don Ziesig

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Conditional Defines for Raspberry PI?

Sven Barth

Am 13.01.2016 17:03 schrieb "Donald Ziesig" <[hidden email]>:
>
> Hi Everyone!
>
> Are there any conditional defines that let me exclude PI-specific code when compiling for 64-bit amd linux (or vice-versa)?
>
> I can define my own if necessary, but that is one more thing to worry about when switching machines.

Raspberry Pi is an ARM so you could check for CPUARM. 64-bit x86 Linux would be CPUX86_64 (for completeness: CPUI386 is for 32-bit x86).

Regards,
Sven


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Conditional Defines for Raspberry PI?

Donald Ziesig
On 01/13/2016 11:29 AM, Sven Barth wrote:

Am 13.01.2016 17:03 schrieb "Donald Ziesig" <[hidden email]>:
>
> Hi Everyone!
>
> Are there any conditional defines that let me exclude PI-specific code when compiling for 64-bit amd linux (or vice-versa)?
>
> I can define my own if necessary, but that is one more thing to worry about when switching machines.

Raspberry Pi is an ARM so you could check for CPUARM. 64-bit x86 Linux would be CPUX86_64 (for completeness: CPUI386 is for 32-bit x86).

Regards,
Sven



--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Thanks - just what I needed.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Conditional Defines for Raspberry PI?

leledumbo
Administrator
In reply to this post by Sven Barth
> Raspberry Pi is an ARM so you could check for CPUARM. 64-bit x86 Linux would be CPUX86_64 (for completeness: CPUI386 is for 32-bit x86).

Also try to compile with -vc, it will list whatever the compiler defines for the target.