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?) 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? 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? thanks, joel -- Joel Hatton -- Security Analyst | Hotline: +61 7 3365 4417 AusCERT - Australia's national CERT | Fax: +61 7 3365 7031 The University of Queensland | WWW: www.auscert.org.au Qld 4072 Australia | Email: auscert@auscert.org.au
On Mon, Nov 07, 2005 at 04:21:56PM +1000, Joel Hatton wrote:> 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:Joel, thanks for pointing this out, I hadn't noticed this until I saw your message. I always build my production servers with CPUTYPE=i686 so they can be transplanted to any machine with a PPro or better processor (or even qemu if necessary). Looking at bsd.cpu.mk, it appears that i686 *IS* still accepted (for 5.x compat?) and is just aliased to CPUTYPE=pentiumpro. Craig
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.
On 11/7/05, Joel Hatton <freebsd-stable@auscert.org.au> wrote:> 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? >That is what I do when I build 5.x, 6.x, and 7-CURRENT on the same server by creating multiple make.conf files. You just need to define the _MAKE_CONF variable for the appropriate OS that you are building: make _MAKE_CONF=/etc/make.conf.6x [build|install]world make _MAKE_CONF=/etc/make.conf.6x [build|install]kernel If your installing the build on another host, you just have to make sure that the /etc/make.conf.* on the build server matches the /etc/make.conf on the target system. Scot -- DISCLAIMER: No electrons were mamed while sending this message. Only slightly bruised.