From owner-freebsd-stable@FreeBSD.ORG Mon Nov 7 18:11:48 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5FA6216A41F for ; Mon, 7 Nov 2005 18:11:48 +0000 (GMT) (envelope-from takeda@takeda.tk) Received: from chinatsu.takeda.tk (node-402413e2.sna.onnet.us.uu.net [64.36.19.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF9BB43D53 for ; Mon, 7 Nov 2005 18:11:42 +0000 (GMT) (envelope-from takeda@takeda.tk) Received: from takeda.lan (takeda.lan [10.0.0.3]) (authenticated bits=0) by chinatsu.takeda.tk (8.13.3/8.13.3) with ESMTP id jA7IBd8S083600 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Mon, 7 Nov 2005 10:11:39 -0800 (PST) (envelope-from takeda@takeda.tk) Date: Mon, 7 Nov 2005 10:11:30 -0800 From: =?Windows-1250?Q?Derek_Kuli=F1ski?= X-Priority: 3 (Normal) Message-ID: <484791138.20051107101130@takeda.tk> To: Joel Hatton In-Reply-To: <200511070621.jA76LuC5049734@app.auscert.org.au> References: <200511070621.jA76LuC5049734@app.auscert.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=Windows-1250 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV 0.87/1165/Sat Nov 5 21:12:58 2005 on chinatsu.takeda.tk X-Virus-Status: Clean Cc: freebsd-stable@freebsd.org Subject: Re: 5.x, 6.x and CPUTYPE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Nov 2005 18:11:48 -0000 Hello Joel, Sunday, November 6, 2005, 10:21:56 PM, you wrote: > Hi, > I've noticed that some CPU definitions have changed in /etc/make.conf > between 5 and 6. For good or for bad, I have up until now been building > 5.x for both p3 and p4 architectures with 'i686' but this particular > definition's removal from 6.x has given me cause to rethink my strategy. > I'd like to know: > Should I use 'i386' and build once for all, or use p3/p4 defs and build > once for each? And if the latter, why? (does this give any worthwhile > performance increase?) i386 will guarantee you that it should work on any PC, while p3/p4 will tell compiler to try using instructions available in pentium 3 or pentium 4. I don't have any performance stats to prove that, but in theory the code should be faster when you use p3 or p4 instead of i386. > If I don't specify a CPUTYPE at all, will this be auto-detected in some > way (which would probably not suit me) or will it fall back to i386? I'm afraid it will fall back to value that will produce code that can run on any PC (which is i386). Actually it won't provide any flag to gcc, but gcc will assume i386. > Is this a consistent requirement for world/kernel/ports? > Finally, when building on a single host, but where multiple requirements > are being met, is it possible to define different make.conf files for make > or is it easier to just edit this file before each build? As long as you defined the variable in this way e.g.: CPUTYPE?=i686 (the question mark is not a typo) This is actually recommended way to assign values like this one. You can pass this argument in make command e.g. make buildworld CPUTYPE=i686 make buildworld CPUTYPE=p4 etc. If you don't give argument, then whatever you have in /etc/make.conf will be assumed as a default value. -- Best regards, Derek mailto:takeda@takeda.tk CCNA, SCSA, SCNA, LPIC, MCP certified http://www.takeda.tk Profanity is the language all programmers know best.