freemint / m68k-atari-mint-gcc

Fork of GNU's gcc with support for the m68k-atari-mint target
https://github.com/freemint/m68k-atari-mint-gcc/wiki
Other
26 stars 7 forks source link

FreeMiNT install docs? #47

Closed danboid closed 2 days ago

danboid commented 3 days ago

I've not been able to find any documentation for installing and running m68k-atari-mint-gcc under FreeMiNT. Are there any? If there are, please add a link to them in the README for this repo.

I have attempted to run gcc (installed onto a ext2 /usr/ partition) under FreeMiNT but it fails to find any of the standard C and C++ headers because the ones that are included in the mint gcc tarballs are in non standard locations. Maybe MiNT gcc has an install script that I don't know about or maybe I'm supposed to set several env vars before I try using gcc under MiNT?

It is my understanding that gcc searches for headers by default under:

     /usr/local/include
     /usr/lib/gcc-lib/target/version/include
     /usr/target/include
     /usr/include

It would seem to me that the header files in the mint gcc tarball are spread across:

/usr/include/c++/7.5.0/ 
/usr/include/c++/7.5.0/tr1/ 
/usr/lib/gcc/m68k-atari-mint/7.5.0/include/ssp/

and more directories, non of which make and gcc are going to find without manual inclusion.

mikrosk commented 2 days ago

You have misunderstood the purpose of gcc's header files. Those are not the ones you are looking for. Keep everything as is and just unpack https://tho-otto.de/snapshots/mintlib/mintlib-mint-latest.tar.bz2 and https://tho-otto.de/snapshots/fdlibm/fdlibm-mint-latest.tar.bz2 into /usr. Problem solved.

danboid commented 2 days ago

I wouldn't say problem solved no.

You've told me to uncompress two extra files, mintlib-mint-latest.tar.bz2 and fdlibm-mint-latest.tar.bz2 into /usr. Where is this requirement documented?

If I can't compile basic C and C++ software without these two extra files then this should be clearly documented, ideally in the README for this repo.

mikrosk commented 2 days ago

Compiler package is not responsible for including libc / libm default libraries as those may be (and they are: see libcmini) different from setup to setup.

Try to boot any linux distro and observe what happens after installing gcc. It downloads binutils, glibc and other needed stuff. So this kind of knowledge is, when tinkering with development stuff on Atari, kind of assumed.

However you are certainly more than welcome to create some user friendly documentation in the wiki if you like.

MedourMehdi commented 2 days ago

First: gcc isn't related to freemint Second: there's no needs for documentation as the behavior is same with every compiler, on windows, osx, linux... The diferrence is that as they use dynamic libraries libc and libm (and many others) are already installed. But application on Atari are linked statically (it means that libc code is includes in the bin) so freemint don't need libc.