• ROOL / Acorn C/C++ compiler define.

    From usenet@garethlock.com@21:1/5 to All on Sun Apr 26 07:51:15 2020
    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??

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From druck@21:1/5 to usenet@garethlock.com on Mon Apr 27 21:21:11 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Thomas@21:1/5 to usenet@garethlock.com on Mon Apr 27 21:17:55 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From jgh@mdfs.net@21:1/5 to All on Mon Apr 27 18:23:46 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From druck@21:1/5 to jgh@mdfs.net on Tue Apr 28 15:21:40 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Theo@21:1/5 to jgh@mdfs.net on Tue May 12 21:57:57 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)