Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Aug 1998 13:50:31 +0200
From:      Alexander Sanda <entropy@compufit.at>
To:        wwoods@cybcon.com
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: gcc 2.8
Message-ID:  <19980822135031.A358@compufit.at>
In-Reply-To: <XFMail.980821171017.wwoods@cybcon.com>; from William Woods on Fri, Aug 21, 1998 at 05:10:17PM -0700
References:  <XFMail.980821171017.wwoods@cybcon.com>

next in thread | previous in thread | raw e-mail | index | archive | help
  On Fri, Aug 21, 1998 at 05:10:17PM -0700,
  William Woods wrote:

> Anybody here useing gcc 2.8 to compile world and/or kernel?

gcc-2.8.1 has some problems with current kernel source (as of last
weekend). 

However, I have installed gcc-2.8.1 from the packages collection, and I
have the vague feeling, that this compiler has some problems. I
compiled one of my kde apps, using -O2 and -mpentiumpro and the app
started to segfault occasionally. Since I recompiled with gcc-2.7.2.1,
it never segfaulted again...

Moving to gcc-2.8.x or egcs/pgcc makes sense for bigger C++ projects
(like KDE for example). The C land doesn't gain much from it. The
processor-specific optimizations (-mpentiumpro e.g.) won't give you a
faster kernel. At least, this is true in the Linux world - the kernel
itself contains handmade processor-specific optimizations, which - of
course - work better than any compiler generated optimizations.

Once a while ago, I did some experiments with compiling the Linux kernel
using different compilers (stock gcc-2.7, egcs, pgcc) and benchmarking
them with lmbench or byte. The results: They all ranged within
measurement tolerance, imho. Even if you run lmbench twice on the same
system, the results will slightly differ.

For kernel code, any compiler-induced problem can be lethal and will
probably result in an unstable system. Bad enough, those bugs would be
extremely hard to track.

As far as we all know, gcc-2.7.2.1 produces ok code. Known problems (if
any, I'am not an expert here) can be workarounded by the really skilled
kernel hackers. Moving to another compiler will perhaps introduce new
problems - as long as the performance gain is practically non-existant,
this is not very desireable.

-- 
# /AS/                               http://privat.schlund.de/entropy/ #
#                                                                      #
# XX has detected, that your mouse cursor has changed position. Please #
# restart XX, so it can be updated.            -- From The Gimp manual #

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980822135031.A358>