Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add "__amigaos3__" define to GCC patchset #62

Open
jens-maus opened this issue Oct 26, 2016 · 2 comments
Open

Please add "__amigaos3__" define to GCC patchset #62

jens-maus opened this issue Oct 26, 2016 · 2 comments

Comments

@jens-maus
Copy link
Member

For convenience reasons it would be great if you could add a default __amigaos3__ define to the GCC patchset. AmigaOS3 has __amigaos4__ and MorphOS has __MORPHOS__ defined by default. To better distinguish between different OS compilations it would be great to have __amigaos3__ defined per default for the GCC 2.95.3 patchset you are using for your cross toolchain.

@cahirwpz
Copy link
Member

Well... one can compile binaries for AmigaOS 1.3 with the toolchain. IMO availability of __amigaos3__ definition would be potentialy misleading in such case.

Is there any reason why you can't use one of default preprocessor definitions listed in amigaos.h ? I could add __amigaos__ if that's really necessary.

@jens-maus
Copy link
Member Author

jens-maus commented Oct 26, 2016

First of all, nobody wants and requires AmigaOS 1.3 anymore ;)

The problem with the standard amigaos, amiga or AMIGA defines is that they are also present in other compiler suites like GCC for OS4 and MorphOS. So to distinguish between GCC for OS4 and MorphOS one can perfectly use __amigaos4__ and __MORPHOS__, but to actually find out if sources are compiled for legacy amigaos one always have to use complex preprocessor statements like

#if !defined(__amigaos4__) && !defined(__MORPHOS__) && !defined(__AROS__)

And this is quite inconvenient. Also please keep in mind that __amigaos3__ shouldn't be interpreted as just referring to compiling for AmigaOS 3.0 or 3.1, but rather means that the sources are compiled for legacy/classic AmigaOS versions. Checks to actually distinguish between AmigaOS 1.x, 2.x and 3.x should rather be done on runtime and not via preprocessor macros, IMHO.

jens-maus added a commit to jens-maus/amigaos-gcc-2.95.3 that referenced this issue Jan 10, 2017
…ould allow to detect classic Amiga systems (<= AmigaOS3) in multi-platform projects more easily. This refs adtools/amigaos-cross-toolchain#62.
jens-maus added a commit to jens-maus/amigaos-gcc-2.95.3 that referenced this issue Jan 10, 2017
…ould allow to detect classic Amiga systems (<= AmigaOS3) in multi-platform projects more easily. This refs adtools/amigaos-cross-toolchain#62.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants