Date: Tue, 8 Apr 2008 13:14:45 -0700 From: "David Allen" <the.real.david.allen@gmail.com> To: freebsd-questions@freebsd.org Subject: Setting CPUTYPE and CFLAGS in make.conf Message-ID: <2daa8b4e0804081314o25b9773bn844734b674856e8c@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
The advice I've read in several posts on the subject involve everything from setting one, setting both, to ignoring both, sometimes with the =? notation and sometimes without. And then, I've read comments that suggest when compiling the kernel, for example, both are ignored, and default values (tucked away somewhere) are always applied. IIRC, the handbook recommends at least setting CPUTYPE. My question isn't a holy grail type of quest for maximised performance, but concerns the meaning of those settings with respect to building world, building kernel and anything in ports. Put another way, I'm not a computer science major, but do have different systems that I compile for, and I'd like to have a better understand WTF I'm really doing. For example, what is the difference, if any, between a binary compiled with: CPUTYPE=opteron CFLAGS=-O -pipe compares with compiling it using: CPUTYPE=pentium3 CFLAGS= compares with compiling it using what I think are the universal defaults of: CPUTYPE= CFLAGS=-O2 -fno-strict-aliasing -pipe that get applied if the make.conf is blank? Can the resulting binary be run on each other's system? Or is it simply optimised to run on one, versus another? Or are those settings relevant to the compilation process only? Or to both the compilation process and the actual performance of the binary? Or should I be taking the dog for a nice long walk instead of watching scrolling compiler output? ;-) If someone could take a moment to explain in moderately technical terms what all the above means, or suggest a source for further reading, I'd be grateful.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2daa8b4e0804081314o25b9773bn844734b674856e8c>