[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Native GCC built




On Wed, Nov 20, 2013 at 8:33 PM, Vincent Rivière <vincent.riviere@freesbee.fr> wrote:
I agree.
<prefix> for the current host build (whatever it is)
<prefix>/<subdir> for foreign multilibs

But that means different library binary packages for different build hosts.
For example, the mintlib binary package will have:
- for 68000 gcc, 68000 libraries in /usr/lib and ColdFire libraries in /usr/lib/m5475
- for ColdFire gcc, ColdFire libraries in /usr/lib and 68000 libraries in /usr/lib/m68000

In other words, if someone provides a binary package for a library, he will have to provide different packages for native 68000 gcc, native ColdFire gcc, Ubuntu cross-compiler, Cygwin cross-compiler... Every library binary package will contain exactly the same binaries, but in different directories.

I don't think this is a problem, since each distribution provides its own set of pre-compiled libraries: SpareMiNT for 68000, Cygwin cross-tools, future Gentoo for ColdFire, etc.

Same as Vincent had the dream about having a full featured C++ compiler for his Atari ST experiments, I had mine -- being able to use a native, optimized compiler for my Falcon. And today, after six years, I finally managed to do that! (some might remember my awkward beginnings ;-))

At my website (usual download location; you might want to reload the frame) you can find all three compilers (m68000, m68020-60, 5475), that is gcc+binutils, ready for packaging into any distribution. In theory, assuming that current gcc can recompile RPM packages from Sparemint, you can have Sparemint/5475 as easy as rpm -ba for each package, no additional changes needed. I think it was Mark who has tried to patch broken builds in Sparemint packages?

Anyway. Remember, there's no /usr/lib/m5475 on FireBee, same as there's no /usr/lib/m68020-60 on Falcon.

If you want, you can even build a native m68060 gcc with very little changes but I don't think it makes sense.

My set of patches and scripts contains:

- patches for gcc and binutils (minor stuff, breaking compilation)
- patch for pml (I cleaned up my Makefile a little, no brute force with sed anymore!)
- build.sh, Makefile, README which explains how it's done (three cross compilers + three native compilers)

Interestingly, no changes to mintlib were needed, I just disabled m68020-60/v4e targets and overridden 'cflags' and 'libdir'.

I briefly tested the m68020-60 build on my Aranym, seems to be working. Also, my build script was tested on Arch Linux/x64 and Fedora 14/x86. I hope someone finds this useful, it was a nice exercise after all :)

--
MiKRO / Mystic Bytes
http://mikro.atari.org