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

Re: [MiNT] C++ Stuff




One of the most annoying thing on the MiNT host it that currently, code has to be be compiled with GCC 2.95.3, it has a bug in the preprocessor so things like #if value != negative_constant returns the wrong result, it has to be rewritten like #if !(value == negative_constant)
The current binutils are patched against this, but gcc is not. So with this kind of bug in the compiler, we could easily miss a preprocessor test, then building an invalid compiler, and so on... Maybe we should fix this preprocessor bug in GCC 2.95.3 first (and repackage an RPM for it) before going further.
I think no need to panic, it isn't that bad. After some sed'ing and grep'ing, I found only one possible suspicious place -- file ./gcc/emit-rtl.c, line 439 -- here's variable STORE_FLAG_VALUE compared to both 1 and -1 (using !=) and in file ./gcc/config/m68k/m68k.h, line 827 we see it's set on -1. Assuming mint target uses this header file, it could lead to some problems. Except this I didn't find anything else.

- port the latest gdb to MiNT. It is complicated, because it's architecture has changed a lot, and some non-trival code has to be written nearly from scratch.
I'm praying for this one every day when I switch on my Falcon ;-)

- use the ELF file format for intermediate object files. It will unlock some GCC features
Just to be sure -- a.out as output format will stay? I.e. no compatibility will be broken regarding running in TOS?
 
currently unavailable for us, and we will get rid of that a.out bugs in gcc that no one wants/know-how to fix. Using ELF is complicated, because the original linker patch expects a.out input files, but I already cleaned up some things and I got very nice results. GCC will have to be reconfigured, too, to take advantage of ELF features. Coming "soon" (?).
Btw, if you need some assistance with this -- during my cooperation with Frank Wille (vasm/vlink/vbcc author/maintainer), he was just in phase he was adding ELF support into his linker (which is able to do the same you want to do -- i.e. mixing ELF obj files into a.out executable). He could provide you with some hints when you'll be feeling desperate :)


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