AmigaPorts / AmigaCMakeCrossToolchains

Mozilla Public License 2.0
11 stars 3 forks source link

Ability to define OS target in m68k.cmake #3

Closed tehKaiN closed 4 years ago

tehKaiN commented 5 years ago

https://github.com/bebbo/amiga-gcc/wiki/Libraries

Suppose one wants to build with libnix on OS2+, so you need -noixemul or -mcrt=nix20. Suppose one wants to build with libnix on OS1.3, you need to specify -mcrt=nix13.

Currently 68k.cmake always specifies -noixemul. You can't just build always OS1.3 executables because Bebbo's GCC loads different set of includes and you can't directly use OS2+ features. When building for OS2+ executables won't work on OS1.3.

So I think we need another parameter similar to M68K_CPU and M68K_FPU which would set OS version. You only need to differentiate OS versions between 1.3 and everything else, so I think adding M68K_KICK13 settable to 0 or 1 would suffice. The other way is to add M68K_AOS settable to 1, 2, or any other number. This seems more future-proof and would allow adding some quirks for given OS version.

@MBeijer what do you think? Which approach should we use?

MBeijer commented 5 years ago

go ahead and add it, as long as it defaults back to -noixemul that'd be fine. just send a pull request and mention "fixes #3" in the message and/or commit and I'll merge it in.

tehKaiN commented 5 years ago

ok, but which way you think would be better? I'd like to do it as future-proof as possible.

MBeijer commented 5 years ago

M68K_CLIB=libnix/nix13/nix20/clib2/newlib

tehKaiN commented 4 years ago

that's fixed by your latest commits!