Subject: Re: gcc on x86 - any cool gimmicks?
To: Peter Seebach <seebs@plethora.net>
From: Frederick Bruckman <fredb@immanent.net>
List: port-i386
Date: 08/07/2002 15:20:32
On Wed, 7 Aug 2002, Peter Seebach wrote:

> It just occurred to me:  By default, gcc is building 386-compatible binaries
> with reasonably general optimization.  Does gcc know enough to optimize
> well for PII or PIII processors?  Is doing this remotely safe or supported?

There's only one way to find out. ;-)

I'm running a NetBSD-1.5.3 kernel and libs built with pkgsrc
gcc-2.95.3, COPTS="-O2 -march=k6". A couple of the binaries don't
build, but I'm sure it's a problem with the package vs base includes,
not with "gcc -march=k6". You shouldn't have that problem with the
in-tree gcc in current and netbsd-1-6. "-march=k6" is the newest one;
"-march=586 and "-march=686" are supported in "egcs" (netbsd-1-5).

I tried pkgsrc "pgcc", too, but it blew up just trying to compile a
kernel.

With the optimized kernel, I notice that some "avi"'s are barely
playable with mplayer, that are otherwise barely unplayable. The
"mplayer" build already insists on optimizing for the processor.
Optimizing the system libraries doesn't seem to make any difference,
nor does optimizing the compiler itself seem to make any difference,
that I can see.

Frederick