From owner-freebsd-questions@FreeBSD.ORG Wed Nov 23 20:58:03 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0C7F16A420 for ; Wed, 23 Nov 2005 20:58:03 +0000 (GMT) (envelope-from russell@russellmeek.net) Received: from a.mx.russellmeek.net (91.59.118.70.cfl.res.rr.com [70.118.59.91]) by mx1.FreeBSD.org (Postfix) with ESMTP id D54EC43D6B for ; Wed, 23 Nov 2005 20:58:00 +0000 (GMT) (envelope-from russell@russellmeek.net) Received: (qmail 4094 invoked by uid 89); 23 Nov 2005 20:58:00 -0000 Received: by simscan 1.1.0 ppid: 2954, pid: 3414, t: 0.9791s scanners: attach: 1.1.0 clamav: 0.87.1/m:34/d:1180 spam: 3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on prometheus.russellmeek.net X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL,HTML_MESSAGE autolearn=ham version=3.1.0 Received: from unknown (HELO ?192.168.8.104?) (russell@russellmeek.net@64.212.109.78) by a.mx.russellmeek.net with (DHE-RSA-AES256-SHA encrypted) SMTP; 23 Nov 2005 20:57:59 -0000 Message-ID: <4384D7D4.7090102@russellmeek.net> Date: Wed, 23 Nov 2005 15:57:56 -0500 From: Russell Meek User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <20051123153513.GE28686@ns2.wananchi.com> <20051123155019.GB1370@dementia.beyondnormal.net> <20051123164714.GB1416@slackbox.xs4all.nl> In-Reply-To: <20051123164714.GB1416@slackbox.xs4all.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: args to `make` within the ports tree X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2005 20:58:04 -0000 Roland Smith wrote: >On Wed, Nov 23, 2005 at 10:50:19AM -0500, Mike Hernandez wrote: > > >>On Wed, Nov 23, 2005 at 06:35:13PM +0300, Odhiambo Washington wrote: >> >> >>>There appears to be so many arguments to `make` when compiling >>>applications fro the ports tree. >>>What beats me is where they are documented ;) >>> >>> >>/etc/make.conf? >> >> > >Try /usr/ports/KNOBS for the most common ones, and the Makefile of each >port for specific ones. > >Roland > > Many ports fail if you try to use extravagant make flags like what you would use with Gentoo. The ones that I use for the most optimal performance are: *CPUTYPE?=* (Enter your CPUTYPE here, ex. prescott, p4, etc.) *CFLAGS= -O -PIPE* *COPTFLAGS= -O -PIPE* Place a space between the *=* and your options. These are systemwide commands that all ports will use during the build process. *CPUTYPE?=* An command for applications to be built with code optimizations for your CPU type, refer to the FreeBSD handbook for the different types available. The most common entries are *p4* if you have a Generic Pentium 4 (Northwood, etc) or *prescott* if you are using a P4 Prescott model processor. There are many for AMD also, these are listed in the handbook. *CFLAGS= -O -PIPE* Command optimizations for the GNU C compiler, -O and -PIPE I believe are standard for FreeBSD 6 Release, however I still include them in my Make.conf. -O2 / -O3 are additional options you can use instead of -O, however it is not recommended. I have used -O2 without any issues when building from ports, however I have noticed no difference between -O and -O2. *-O* sets the optimization level, in this case 1. *- PIPE* causes code to be passed between processes using pipes during compilation rather than using temporary files, which has obvious I/O advantages. *COPTFLAGS= -O -PIPE* Optimizational flags used when compiling your kernel, again I stick to what works -O and -PIPE. I have noticed no breakage when using -O2, but then again I have noticed no performance increase on my servers either. If you are just looking for some quick tweaks, these should set you on the right track. Thanks, Russell