Apparently, 68000 support has landed in LLVM. I'm not too informed about this but I guess this means we can finally expect modern C/C++ compiler based cross compilation in the near future for our beloved STs.
Here's a link to the new 68K part in the LLVM source: https://github.com/llvm/llvm-project/tr ... arget/M68k
68000 support has landed in LLVM
Moderator: troed
Re: 68000 support has landed in LLVM
It's quite an impressive achievement by Min, yes. He talked about it a few months ago in an Planet m68k evening chat: http://m68k.info/#orgf36bc79
But it's still a very long way before LLVM (or rather Clang) becomes usable on the Atari. For example, there are no libraries (not even the standard C library), nor is it capable of generating TOS executables. In contrast, all of this exists for gcc, which already gives you modern C/C++ compiler based cross compilation today.
But it's still a very long way before LLVM (or rather Clang) becomes usable on the Atari. For example, there are no libraries (not even the standard C library), nor is it capable of generating TOS executables. In contrast, all of this exists for gcc, which already gives you modern C/C++ compiler based cross compilation today.
- stephen_usher
- Posts: 5680
- Joined: Mon Nov 13, 2017 7:19 pm
- Location: Oxford, UK.
- Contact:
Re: 68000 support has landed in LLVM
Given the bloat most modern compilers produce I wouldn't be surprised if cross compiled binaries for "Hello World!" are larger than the ST's memory.
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
Re: 68000 support has landed in LLVM
Hm, "Hello world" with gcc 9.3.1 and libcmini: 3.4 kBytes.stephen_usher wrote: ↑Wed Mar 24, 2021 9:49 am Given the bloat most modern compilers produce I wouldn't be surprised if cross compiled binaries for "Hello World!" are larger than the ST's memory.
- Attachments
-
- hello.zip
- (2.43 KiB) Downloaded 120 times
- thorsten.otto
- Posts: 148
- Joined: Mon Nov 04, 2019 2:20 am
Re: 68000 support has landed in LLVM
That's mostly a matter of the library rather than the code produced by the compiler. Look at EmuTOS, which has lots of features in the 192k ROM from newer TOS versions, a builtin harddisk driver and several other things, compared to the original 192k ROMs that were compiled by an ancient compiler (and even large parts done in assembler).stephen_usher wrote: ↑Wed Mar 24, 2021 9:49 am Given the bloat most modern compilers produce I wouldn't be surprised if cross compiled binaries for "Hello World!" are larger than the ST's memory.
Re: 68000 support has landed in LLVM
Thanks a lot for promoting libcmini! .czietz wrote: ↑Wed Mar 24, 2021 10:04 amHm, "Hello world" with gcc 9.3.1 and libcmini: 3.4 kBytes.stephen_usher wrote: ↑Wed Mar 24, 2021 9:49 am Given the bloat most modern compilers produce I wouldn't be surprised if cross compiled binaries for "Hello World!" are larger than the ST's memory.
To be fair, however, I think it must be mentioned that it's not mintlib's fault to produce so much larger binaries than libcmini. It's more a question of what you want to achieve. Mintlib was designed from the beginning as a universal library to support as much standard functionality as possible. It has (nearly) full ISO standard conformance and also supports gcc and other extensions. As a result, you can throw most sourcecode at it that has been originally written for Unix/Linux and it will compile with minimum or even no change at all. There is one huge drawback: size.
Libcmini does not aim to compete in that area at all. Its aim is to produce the smallest possible size for binaries and it doesn't care much about standards compatibility. If you want, it more or less disregards any development of the C language standardisation after the 80s. But it allows to create really small C programs for our dinosaurs.
IMHO, both approaches have their own value (and its good to have a choice).
And remember: Beethoven wrote his first symphony in C.