Setting CPUTYPE and CFLAGS in make.conf
the.real.david.allen at gmail.com
Wed Apr 9 18:35:55 UTC 2008
On Wed, Apr 9, 2008 at 10:44 AM, RW wrote:
> On Tue, 8 Apr 2008 13:14:45 -0700 David Allen wrote:
> > 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.
> Avoid setting CFLAGS unless you have a good reason - Gentoo
> documentation has a lot to answer for. CPUTYPE causes "-march" to be
> applied, so it can affect compatibility. AFAIK both setting do affect
> world and kernel because CFLAGS can cause a build to fail, and I've
> seen matching march settings in kernel builds.
> > Or are those settings relevant to the
> > compilation process only? Or to both the compilation process and the
> > actual performance of the binary?
> It can be either, -O2 is related to execution, -pipe speeds-up
Thank you for your reply. It's starting to make a lot more sense.
Just to confirm, then, if there's no CPUTYPE set, I can then set up
a build server on an Opteron box, for example, to build world, kernel
and ports binaries that can then be installed on my Thinkpad or
a PIII box?
More information about the freebsd-questions