Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #6084 > unrolled thread

ROOL / Acorn C/C++ compiler define.

Started byusenet@garethlock.com
First post2020-04-26 07:51 -0700
Last post2020-05-12 21:57 +0100
Articles 6 — 5 participants

Back to article view | Back to comp.sys.acorn.programmer


Contents

  ROOL / Acorn C/C++ compiler define. usenet@garethlock.com - 2020-04-26 07:51 -0700
    Re: ROOL / Acorn C/C++ compiler define. David Thomas <dave@davespace.co.uk> - 2020-04-27 21:17 +0100
    Re: ROOL / Acorn C/C++ compiler define. druck <news@druck.org.uk> - 2020-04-27 21:21 +0100
    Re: ROOL / Acorn C/C++ compiler define. jgh@mdfs.net - 2020-04-27 18:23 -0700
      Re: ROOL / Acorn C/C++ compiler define. druck <news@druck.org.uk> - 2020-04-28 15:21 +0100
      Re: ROOL / Acorn C/C++ compiler define. Theo <theom+news@chiark.greenend.org.uk> - 2020-05-12 21:57 +0100

#6084 — ROOL / Acorn C/C++ compiler define.

Fromusenet@garethlock.com
Date2020-04-26 07:51 -0700
SubjectROOL / Acorn C/C++ compiler define.
Message-ID<52cb9a64-ed6c-4032-9804-3bbef57f84c3@googlegroups.com>
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??

[toc] | [next] | [standalone]


#6085

FromDavid Thomas <dave@davespace.co.uk>
Date2020-04-27 21:17 +0100
Message-ID<r87elj$h1a$1@dont-email.me>
In reply to#6084
On 26/04/2020 15:51, usenet@garethlock.com wrote:
> 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??

__riscos


[toc] | [prev] | [next] | [standalone]


#6086

Fromdruck <news@druck.org.uk>
Date2020-04-27 21:21 +0100
Message-ID<r87err$j77$1@dont-email.me>
In reply to#6084
On 26/04/2020 15:51, usenet@garethlock.com wrote:
> 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??

__riscos is defined by Norcroft

---druck

[toc] | [prev] | [next] | [standalone]


#6087

Fromjgh@mdfs.net
Date2020-04-27 18:23 -0700
Message-ID<16302442-b74c-48df-893b-94ce2b6cbdf3@googlegroups.com>
In reply to#6084
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

[toc] | [prev] | [next] | [standalone]


#6088

Fromdruck <news@druck.org.uk>
Date2020-04-28 15:21 +0100
Message-ID<r89e5k$gqn$1@dont-email.me>
In reply to#6087
On 28/04/2020 02:23, jgh@mdfs.net wrote:
> 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.

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

[toc] | [prev] | [next] | [standalone]


#6091

FromTheo <theom+news@chiark.greenend.org.uk>
Date2020-05-12 21:57 +0100
Message-ID<9En*1nSRx@news.chiark.greenend.org.uk>
In reply to#6087
jgh@mdfs.net wrote:
> 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.

__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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.acorn.programmer


csiph-web