From mint-bounce@lists.fishpool.fi Sun Feb 15 06:56:16 2009 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=8jrybZXTmLU9hxWlTrzzx0QfOfp4tpUjWP9l6KBxJ0g=; b=PyG3dOXazRbAMbaRG4XR8xI9gPqa2RIfw02Kbaa89ggzFuscRFEi17gVmdcY8fCgVh 8j6oU2SAfQe9x10Z+kny+4VhPofYEsACagiqbVvMWIbN59cH94/WFewCscx8qh5izbiA WrOpPswq64ByS+SeVqNZ8ET02E1bKprTv7pbQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=bWI4wE0bJti0cIu1lbeqtmMmirMnMFEdB05mcfxlhEpXVcaCJCqgjvbsrmKzreDQ0W ketSQfDqdQcKDcxNJXKqehoraT4FK9+SmpX9nggrv0VfR18VabV/RaLdiVsVZo2l0ygm 0Nl4vIP9JzXsbxPfvfVNzHQ9A/FdLas2HZZT4= MIME-Version: 1.0 In-Reply-To: <4997FABF.1090206@freesbee.fr> References: <499665F5.809@atari-source.org> <4996E70E.1030603@atari-source.org> <4996EE34.8090002@freesbee.fr> <499740F4.2010203@atari-source.org> <49974575.2000506@freesbee.fr> <49975513.9060606@atari-source.org> <499764EF.5010403@freesbee.fr> <49976AAE.8090700@atari-source.org> <4997FABF.1090206@freesbee.fr> Date: Sun, 15 Feb 2009 12:51:36 +0100 Message-ID: Subject: Re: [MiNT] C++ Stuff From: Miro Kropacek To: =?ISO-8859-1?Q?Vincent_Rivi=E8re?= Cc: mint , Mark Duckworth Content-Type: multipart/alternative; boundary=001636457c723399fc0462f3b164 X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: miro.kropacek@gmail.com Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: --001636457c723399fc0462f3b164 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit > 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 --001636457c723399fc0462f3b164 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
One of the most annoying thing on the MiNT host it that curre= ntly, code has to be be compiled with GCC 2.95.3, it has a bug in the prepr= ocessor so things like #if value !=3D negative_constant returns the wrong r= esult, it has to be rewritten like #if !(value =3D=3D 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, the= n building an invalid compiler, and so on... Maybe we should fix this prepr= ocessor 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'in= g and grep'ing, I found only one possible suspicious place -- file ./gc= c/emit-rtl.c, line 439 -- here's variable STORE_FLAG_VALUE compared to = both 1 and -1 (using !=3D) and in file ./gcc/config/m68k/m68k.h, line 827 w= e see it's set on -1. Assuming mint target uses this header file, it co= uld 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 ha= s changed a lot, and some non-trival code has to be written nearly from scr= atch.
I'm praying for this one every day when I switch on my Falcon ;-)<= br>
- us= e the ELF file format for intermediate object files. It will unlock some GC= C features
Just to be sure -- a.out as output format will stay? I.e. no compatibi= lity 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 o= riginal linker patch expects a.out input files, but I already cleaned up so= me things and I got very nice results. GCC will have to be reconfigured, to= o, to take advantage of ELF features. Coming "soon" (?).
Btw, if you need some assistance with this -- during my cooperation wi= th 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 w= ant to do -- i.e. mixing ELF obj files into a.out executable). He could pro= vide you with some hints when you'll be feeling desperate :)


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