gcc -O flags (was GLIBC Coredump)

Thomas T. Veldhouse veldy at veldy.net
Fri Jul 14 16:08:08 PDT 2000


Do you honestly think you are going to notice the performance difference?  I
would stick with what is known to work well.

Tom Veldhouse
veldy at veldy.net

Mattias Axelsson wrote:

> Is the advice from FreeBSD to _never_ use -O2 or -O3 on intel machines?
> >From what I can understand, -O3 among other things makes loop unrolling
> and function inlining, which I thought were safe performance boosters.
>
> glibc seems to fail compiling with -O3 (I'm not ready with -O2 yet) but
> how is it with other packages? Are there any more packages that will fail
> to compile, or worse, compile but fail to work, when using -O2 or -O3 then
> I would be glad to hear about it. Or should I just give up and use just -O
> all the time?
>
> /Mattias
>
> "Thomas T. Veldhouse" wrote:
> >
> > I use:  -O -pipe -march=pentiumpro
> >
> > That is it. I use it for both CFLAGS and CXXFLAGS.
> >
> > I am going to rebuild all my C++ packages with
> >
> > CXXFLAGS= -O -pipe -march=pentiumpro -fmemoize-lookups -fsave-memoized
> >
> > -O2 and above is known to cause some problems in rare cases on i386 - and
> > many cases on alpha machines.  I did run into a problem with -O2 once (for
> > gcc-2.95.2), but I don't recall what package it was (it was before I started
> > building my own system).
> >
> > Here is a quote from the /etc/make.conf in FreeBSD 4.0-STABLE.
> >
> > # CFLAGS controls the compiler settings used when compiling C code.
> > # Note that optimisation settings above -O (-O2, ...) are not recommended
> > # or supported for compiling the world or the kernel - please revert any
> > # nonstandard optimisation settings to "-O" before submitting bug reports
> > # to the developers.
> > # Note also that at this time the -O2 setting is known to produce BROKEN
> > # CODE on the Alpha platform.
> >
> ________________________________________________________________________
> Get Your Private, Free Fortune from Barbapapa at http://www.barbanet.com
> --
> Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
> IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
> Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
> "unsubscribe" (without the quotation marks) in the body of the message
> (no subject is required)

--
Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)



More information about the lfs-dev mailing list