Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2004 16:58:04 -0500
From:      Vulpes Velox <v.velox@vvelox.net>
To:        Puna Tannehill <puna@imagescape.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: 3dnow, mmx, k6-2 optimizing?
Message-ID:  <20040913165804.0acfeecd@vixen42.24-119-122-191.cpe.cableone.net>
In-Reply-To: <41460D5B.3030100@imagescape.com>
References:  <4145D786.4080807@imagescape.com> <20040913141026.6d572ae2@dolphin.local.net> <41460D5B.3030100@imagescape.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 13 Sep 2004 16:12:59 -0500
Puna Tannehill <puna@imagescape.com> wrote:

> > I don't know why those flags would not be working for you; I've
> > been using them for quite some time now on my Athlon (32-bit) box.
> >  One
> > oddity I just noticed very recently is that, with the recent
> > patches to"make", the CPUTYPE variable seems to be ignored now,
> > which is why I explicitly added the "-march" flag to CFLAGS. 
> > Also, note that I don't use "-mmmx -m3dnow" for kernel builds; you
> > don't want to be doing this, as it can easily break things in the
> > kernel, but for general builds and port builds, it's fine:

Hmm, really?  Not had much of a problem with it here and kernel
builds.

> > CPUTYPE?=athlon
> 
> I had that problem too.  The '?=' should be just '='.  I see in the 
> notes that '?=' is for compiling for different machine, but I don't
> do that so I just left is as 'CPUTYPE=' and it added the -march
> accordingly.
> 
> > CFLAGS= -O3 -pipe -march=athlon -mmmx -m3dnow

On a related question, any one know in what combination -mmmx, -msse,
and -m3dnow are useful in? I got bored once and tried all three on
5.3beta3 and ended up breaking a few things and ncurses was not
working right in all situations with it.

BTW was a little confused when reading the docs, are these for like
when are building for like 586 and want to include sse, 3dnow, or the
like? Or does the CPUTYPE not all ready take care of that?

> > # buildkernel variables settings
> > 
> > KERNCONF=CUSTOM
> > COPTFLAGS= -O3 -pipe -march=athlon
> 
> I see many people using a -O3, but I've never been able to use any 
> optimization levels above -O without compile errors, or having 
> problems with SSH.  Just out of curiosity, do you see a significant 
> different in performance with that level of optimization?

Never noticed much or any difference when I messed with it. Just had
thinks break in annoying ways. I've personally ran into lots of
problems with X stuff compiled with -O3. IIRC it would compile and ect
but generally fail on run time where with -02 it would general be
compile problems with later things... or something like that...



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