NetBSD-Users archive

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

gcc4 vs gcc3: a case (kerTeX)



Hello,

This may be of some interest to others.

Having upgraded from NetBSD 3.1 to NetBSD 5.0.2, the system compiler has
been upgraded as well from gcc3.x to gcc4.1.3.

For example when compiling kerTeX, the results were correct with gcc3.x
but with NetBSD now gcc4.1.3, the compilation went OK but METAFONT
(inimf(1)) was now unable to master some instructions (plain.mf).

It turns out that my CFLAGS were still specifying "-O2" and that the
result was a mess; while "-O" alone works. I suspect whether FPU
optimizations (while the D.E. Knuth's programs are integer based, mf(1)
does a lot of arithmetic (scaled integers) and perhaps some
optimizations shift to FPU while the code uses carefully structures
etc.), or some "volatile" that are optimized out.

But this may help some others in a similar case, where no errors are
detected in compilation but the result doesn't work.

Cheers,
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                      http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C



Home | Main Index | Thread Index | Old Index