From owner-freebsd-stable Tue May 8 13:12:58 2001 Delivered-To: freebsd-stable@freebsd.org Received: from zuerich02.bluecobalt.net (zuerich02.bluecobalt.net [193.0.232.29]) by hub.freebsd.org (Postfix) with ESMTP id 5FE6A37B423 for ; Tue, 8 May 2001 13:12:55 -0700 (PDT) (envelope-from plm@mutsaers.com) Received: from mutsaers.com (adsl-unlimited.callino.ch [217.20.192.106] (may be forged)) by zuerich02.bluecobalt.net (8.9.3/8.9.3) with ESMTP id WAA08194; Tue, 8 May 2001 22:12:40 +0200 Received: (from plm@localhost) by mutsaers.com (8.11.3/8.11.1) id f48KCdS00558; Tue, 8 May 2001 22:12:39 +0200 (CEST) (envelope-from plm) To: Nuno Teixeira Cc: Subject: Re: CFLAGS Optimization References: <20010507230417.F508-100000@gateway.bogus> From: Peter Mutsaers Date: 08 May 2001 22:12:39 +0200 In-Reply-To: Nuno Teixeira's message of "Mon, 7 May 2001 23:36:31 +0100 (WEST)" Message-ID: <87wv7rmwg8.fsf@mutsaers.com> Lines: 34 User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> "Nuno" =3D=3D Nuno Teixeira 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