REMINDER - Stay logged in for at least 2 hours a week to get whitelisted.
Also it helps build a picture where our "good traffic" is coming from for detection scripts.
:o)

68000 support has landed in LLVM

News,announcements,programming,fixes,game patches & discussions.
User avatar
sandord
Posts: 764
Joined: 13 Aug 2018 22:08
Location: The Netherlands

68000 support has landed in LLVM

Post by sandord »

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
czietz
Posts: 587
Joined: 14 Jan 2018 13:02

Re: 68000 support has landed in LLVM

Post by czietz »

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.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7451
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: 68000 support has landed in LLVM

Post by stephen_usher »

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.
czietz
Posts: 587
Joined: 14 Jan 2018 13:02

Re: 68000 support has landed in LLVM

Post by czietz »

stephen_usher wrote: 24 Mar 2021 09:49 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.
Hm, "Hello world" with gcc 9.3.1 and libcmini: 3.4 kBytes.
You do not have the required permissions to view the files attached to this post.
User avatar
thorsten.otto
Posts: 148
Joined: 04 Nov 2019 02:20

Re: 68000 support has landed in LLVM

Post by thorsten.otto »

stephen_usher wrote: 24 Mar 2021 09:49 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.
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).
User avatar
mfro
Posts: 125
Joined: 13 Dec 2018 07:32

Re: 68000 support has landed in LLVM

Post by mfro »

czietz wrote: 24 Mar 2021 10:04
stephen_usher wrote: 24 Mar 2021 09:49 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.
Hm, "Hello world" with gcc 9.3.1 and libcmini: 3.4 kBytes.
Thanks a lot for promoting libcmini! ;).

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.

Return to “SOFTWARE PROGRAMMING & DISCUSSION”

Who is online

Users browsing this forum: ClaudeBot and 5 guests