Skip site navigation (1)Skip section navigation (2)
Date:      08 May 2001 22:12:39 +0200
From:      Peter Mutsaers <peter@mutsaers.com>
To:        Nuno Teixeira <nuno.mailinglists@pt-quorum.com>
Cc:        <freebsd-stable@FreeBSD.ORG>
Subject:   Re: CFLAGS Optimization
Message-ID:  <87wv7rmwg8.fsf@mutsaers.com>
In-Reply-To: Nuno Teixeira's message of "Mon, 7 May 2001 23:36:31 %2B0100 (WEST)"
References:  <20010507230417.F508-100000@gateway.bogus>

next in thread | previous in thread | raw e-mail | index | archive | help
>> "Nuno" =3D=3D Nuno Teixeira <nuno.mailinglists@pt-quorum.com> writes:

    Nuno> I came from Linux and at that time I used CFLAGS to optimize
    Nuno> general programs and linux kernel.

    Nuno> For example:

    Nuno> [i686]: CFLAGS=3D'-O9 -funroll-loops -ffast-math
    Nuno> -malign-double -mcpu=3Dpentiumpro -march=3Dpentiumpro
    Nuno> -fomit-frame-pointer -fno-exceptions'

On an AMD Athlon (i686 like) I use in =E6tc/make.conf:

CFLAGS=3D -O2 -pipe -march=3Dpentiumpro

and

# To compile just the kernel with special optimisations, you should use
# this instead of CFLAGS (which is not applicable to kernel builds anyway):
#
COPTFLAGS=3D -O2 -pipe -march=3Dpentiumpro


-O2, according to man gcc, turns on all optimizations except those
that involve a space-speed tradeoff, such as
-funroll-loops. Especially for the kernel, the effect of that one
might be negative (cache memory is small and precious).

The correct -m... options are all implied by -march=3Dpentiumpro


--=20
Peter Mutsaers  |  D=FCbendorf    | UNIX - Live free or die
plm@gmx.li      |  Switzerland  | Sent via FreeBSD 4.3-stable

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?87wv7rmwg8.fsf>