Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 May 2001 16:35:54 -0700 
From:      Michael VanLoon <MichaelV@EDIFECS.COM>
To:        'Juha Saarinen' <juha@saarinen.org>, Nuno Teixeira <nuno.mailinglists@pt-quorum.com>, Guilherme Oliveira <guilherme@nortenet.pt>
Cc:        FreeBSD Stable <freebsd-stable@FreeBSD.ORG>
Subject:   RE: CFLAGS Optimization
Message-ID:  <36F7B20351634E4FBFFE6C6A216B30D54BDD@ecx1.edifecs.com>

next in thread | raw e-mail | index | archive | help

> From: Juha Saarinen [mailto:juha@saarinen.org]
> Sent: Monday, May 07, 2001 4:24 PM
> 
> :: > Nuno Teixeira wrote:
> :: > >
> :: > > [i586]:
> :: > > CFLAGS='-O3 -mcpu=pentium -march=pentium -ffast-math 
> -funroll-loops
> :: > > - -fomit-frame-pointer -fforce-mem -fforce-addr -malign-double
> :: > > - -fno-exceptions'
> 
> -O2/-O3 turn on -fforce-mem;
> -march implies -mcpu;
> -fno-exceptions doesn't make anything run faster, and could 
> break some C++
> code;
> 
> I've had bad experience with any optflags above -O on FreeBSD.

Actually, implying that -O3 causes potential problems _in_FreeBSD_ is a
misnomer.  GCC is essentially the same, no matter which platform it's
running on, especially if they're all Intel based.  Linux has the same
potential to be bitten by badly-formed -O3 code as
FreeBSD/NetBSD/Linux/BeOS/etc. does.

The point is that GCC doesn't always generate correct code when heavy
optimizations are turned on.  Whether you've been bitten by that yet, or
not, can often times vary depending on how hard you push your system and how
closely you pay attention.  It can sometimes turn up in very infrequent,
subtle ways.

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




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