Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ROOL / Acorn C/C++ compiler define.

32 views
Skip to first unread message

use...@garethlock.com

unread,
Apr 26, 2020, 10:51:16 AM4/26/20
to
Looking to make Brix compilable for multiple targets. Is there a macro that's defined by the Norcroft / Acorn DDE that identifies it as the platform being used...

Something like...

#ifdef ARM_RISCOS as on GCC??

David Thomas

unread,
Apr 27, 2020, 4:17:57 PM4/27/20
to
__riscos



druck

unread,
Apr 27, 2020, 4:21:16 PM4/27/20
to
On 26/04/2020 15:51, use...@garethlock.com wrote:
__riscos is defined by Norcroft

---druck


j...@mdfs.net

unread,
Apr 27, 2020, 9:23:47 PM4/27/20
to
Why do you want to know what platform the compiler is being
used on? Surely you want to know what platform the code is
being targetted for.

jgh

druck

unread,
Apr 28, 2020, 10:21:41 AM4/28/20
to
Well you can assume if _riscos is defined you are compiling with
Norcroft for RISC OS, and if _WIN32 is defined you are compiling with
msvc for Windows. But if you are compiling with gcc, it could be
targeted at RISC OS, Windows or Linux. In such as case you can define
your own OS specific symbol with -Dsomething in your makefile.

---druck

Theo

unread,
May 12, 2020, 4:57:59 PM5/12/20
to
__riscos is defined by compilers (Norcroft and GCC) that are targeting RISC
OS. It doesn't matter what OS the compiler is running on, the code being
compiled can't tell.

Cross compiling systems (notably autotools) allow build/host/target systems
all to be different so you can distinguish between programs to run on the
build machine and those to run on the machine you're cross-compiling for,
but that's not relevant inside the compiler itself.

Theo
0 new messages