GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

C and PASCAL (or any other high-level languages) in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

mikro
Hardware Guru
Hardware Guru
Posts: 1784
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

Postby mikro » Tue Sep 25, 2018 9:29 am

GCC 7.3.0 for the FreeMiNT target has been just released: https://github.com/freemint/m68k-atari- ... 7_3_0-mint

The main difference against GGN's GCC (currently in version 8.2) is that this toolchain provides the more traditional patchset, i.e. producing a.out binaries compatible with TOS executables, doesn't require any special flags or pre-/post-processing. And hey, works natively on the FireBee!

On the other hand it is, well, an a.out target so it doesn't produce so finely tuned link time optimisations.

vido
Atari Super Hero
Atari Super Hero
Posts: 621
Joined: Mon Jan 31, 2011 7:39 pm

Re: GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

Postby vido » Tue Sep 25, 2018 10:18 am

This is great!
Thanks Mikro! :)

PeterS
Captain Atari
Captain Atari
Posts: 201
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

Postby PeterS » Tue Sep 25, 2018 12:27 pm

Fantastic work.

mikro
Hardware Guru
Hardware Guru
Posts: 1784
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

Postby mikro » Tue Sep 25, 2018 1:30 pm

Hold on with celebrations, Thorsten has found a bug in m68020/m5475 versions. Investigating... :-/

ThorstenOtto
Captain Atari
Captain Atari
Posts: 449
Joined: Sun Aug 03, 2014 5:54 pm

Re: GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

Postby ThorstenOtto » Tue Sep 25, 2018 1:36 pm

And just for those who are not reading the mailing list: cross-compilers for gcc 7.3.1 and 8.2 are available since quite some time on http://tho-otto.de/crossmint.php, together with some commonly used packages, for linux, win32 and macOS.

Mikro's versions are native compilers, usable on mint.

vido
Atari Super Hero
Atari Super Hero
Posts: 621
Joined: Mon Jan 31, 2011 7:39 pm

Re: GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

Postby vido » Tue Sep 25, 2018 1:39 pm

ThorstenOtto wrote:Mikro's versions are native compilers, usable on mint.

Native compilers are what I need/use :)

mikro
Hardware Guru
Hardware Guru
Posts: 1784
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

Postby mikro » Wed Oct 03, 2018 6:50 pm

All good, the archives now contain properly configured and built compilers for all three platforms. Same URL as in the first post.

User avatar
jfl
Atari Super Hero
Atari Super Hero
Posts: 868
Joined: Tue Jul 18, 2006 10:55 pm
Location: Liège, Belgium
Contact:

Re: GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

Postby jfl » Wed Oct 03, 2018 7:04 pm

Thanks mikro and anyone else involved. I too use the native GCC, on my FireBee. So this is really welcomed news.
Jean-François
GEMDict – GEMClip

ThorstenOtto
Captain Atari
Captain Atari
Posts: 449
Joined: Sun Aug 03, 2014 5:54 pm

Re: GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

Postby ThorstenOtto » Thu Oct 04, 2018 9:18 am

It should be noted that you may still run into some problems with newer gcc: the previous toolchain (gcc 4.6.4 in most cases) compiled in c99 mode by default. gcc 7.x uses c11, and gcc 8.x c17. While this might be even required to be able to compile some newer packages, the mintlib currently does not completely support this, so you may encounter some missing functions here and there.

BlankVector
Captain Atari
Captain Atari
Posts: 461
Joined: Wed Oct 24, 2007 7:52 pm
Location: France
Contact:

Re: GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

Postby BlankVector » Thu Oct 04, 2018 9:33 am

Great job :)
Subscribe to my Vretrocomputing channel on YouTube and Facebook.

User avatar
LaurentS
Captain Atari
Captain Atari
Posts: 274
Joined: Mon Jan 05, 2009 5:41 pm

Re: GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

Postby LaurentS » Wed Nov 21, 2018 12:22 pm

Hi,

I've given a try to the gcc8.2.1 under linux with Otto's pre compiled programs and it works well. That's a great job.

I've got a question : I've compiled a quick hello word program (source and compile command below), and the result is 103849 bytes.
Is there a way to get lighter exe ?
I would expect a less than 4 kb exe in this case.

Regards
Laurent

The source ;)

#include <stdio.h>

int main(int argc, char* argv[])
{
puts("Hello, world !");

return 0;
}


The compile command : m68k-atari-mint-gcc hello.c -o hello.tos -O2 -m68030 -s

ThorstenOtto
Captain Atari
Captain Atari
Posts: 449
Joined: Sun Aug 03, 2014 5:54 pm

Re: GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

Postby ThorstenOtto » Wed Nov 21, 2018 12:45 pm

LaurentS wrote:Hi,
I've given a try to the gcc8.2.1 under linux with Otto's pre compiled programs and it works well. That's a great job.


Thanks ;)

I've got a question : I've compiled a quick hello word program (source and compile command below), and the result is 103849 bytes.


Yes, thats the drawback of having a (mostly) posix compliant c-library. Other system don't care about that, because the library is mostly shared nowadays.

Is there a way to get lighter exe ?


That depends on the program. For simple ones, you can use Markus' libcmini, but of course that lacks a lot of functions available in mintlib. Also, file I/O using stdio streams is rather slow there, because it is always unbuffered.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1807
Joined: Sun Jul 31, 2011 1:11 pm

Re: GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

Postby Eero Tamminen » Wed Nov 21, 2018 10:15 pm

One gets minimal HelloWorld binary also "with MiNTlib", by:
* using TOS calls instead of C file stream functions like puts()
* telling GCC not to link full startup code (as no argument parsing is needed)

(Full startup code may also depend on printf/file stream functions for error reporting i.e. everything they indirectly bring in.)

ThorstenOtto
Captain Atari
Captain Atari
Posts: 449
Joined: Sun Aug 03, 2014 5:54 pm

Re: GCC 7.3.0 for m68k / m68020-60 / m5475 (ColdFire)

Postby ThorstenOtto » Thu Nov 22, 2018 3:00 am

Eero Tamminen wrote:One gets minimal HelloWorld binary also "with MiNTlib", by:
* telling GCC not to link full startup code (as no argument parsing is needed)


That *might* work, but then you have to write your own startup code. And even simple programs (beside hello world) usually need argument parsing, at least for a supplied filename as argument. And of course you must make sure that you don't accidently access stdin/stdout/stderr somehow, since they are not properly initialized.


Social Media

     

Return to “C / PASCAL etc.”

Who is online

Users browsing this forum: No registered users and 2 guests