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

Re: [MiNT] gcc4 vs gcc2 crash "test case"



Hello,

> 1) Warnings. When compiling Quake with GCC 4.2.2, a lot of warnings are
oh yes. you know, quake is dated from the times of gcc2 so it's no
surprise at all :)

> 2) Memory problem. When I run Quake without any option, it crashes
I can't believe this! It was part of the original code, I have no idea
why I didn't fix this. Shame on me :)

> 3) Alignment. Sometimes, Quake complains about "Globals are
> missaligned". This is because the test variable is not aligned on a
> 32-bit boundary. It might not be a problem (except for performance
> issues), I disabled the tests in R_RenderView() in r_main.c
>
Wow. This is the first time I see something like that -- are you sure
you shouldn't enable this things in gcc4 then? (alignment on 32bit).

> 4) Special care must be taken for cross-compiling Quake. The file
> quakedef68k.i contains defines for structure offsets to be used in the
Good point, thanks.

> files. It is still possible to cross-compile Quake by disabling the
> generation of quakedef68k.i and by using the one produced by a native
> build of gendefs.c. I spent a lot of time on that bug, because I thank
hm, I don't remember the exact algorithm of this generator, there's no
chance to make this OK also for cross-building? You know, it's the
same gcc (alignment, int size etc should be same) but maybe I'm wrong
here..

> The weird thing is that the precision problem is not exactly the same
> when using different optimization options.
>
Wow again. How it's possible this didn't appeared in gcc2? I can't
even imagine how you observed this behaviour, it generates some kind
of error?

> 6) The real problem: after loading all the files, Quake fails with Bus
> Error, pc=0x3ff80000. It fails when compiled with GCC 4.2.2 (either
> cross or native) with -m68020-60 and -O1. However it works without
> optimization. I haven't found the cause of that bug yet.
>
Hm, as I mentioned, I've tried to compile -m68060 gcc4 and I also
found (totally different but who knows) problems. Try to compile it
with -m68000 (but asm files are for 68020+ and fpu).

> So far, a lot of time spent, a lot of issues found, but not the real
> one. I continue the investigation.
>
I appreciate your work, I really prey you'll find that nasty problem
why it refuses to work. Be sure to send me final patch to quake then
;-) Btw, as I undestand it, we have two problems with this quake:
1) it doesnt work using cross compiled gcc4+mintlib(+binutils2.18?)
2) it doesnt work using gcc4 and gcc2-compiled mintlib(+binutils2.13?)

Right?

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