On Tue Mar 8 11, George Liaskos wrote: > > either "native" or "nocona" (actually native should evaluate to nocona): > > > > touch _native_test.c && gcc -march=native -### _native_test.c > > > > should tell which -march and -mtune settings gcc assumes for "native". > > > > indeed there are some known problems with "native", but i think those are > > limited to architectures such as mips and arm. with i386 or amd64 "native" > > shouldn't cause any problems. > > > > i think core2 was always wrong to set in make.conf, because the base gcc simply > > does not support it. however so many people are trying to boost speed etc. by > > adding make.conf options they find scattered over the internet and on various > > linux dist wikis, that core2 was added as a workaround so people could use it > > (even though it wasn't supported). > > I still don't understand how bsd.cpu.mk is going to handle "native" as > value to set CPUTYPE / MACHINE_CPU, or this is irrelevant? > Would it be better to use the following? "native" doesn't get handled by bsd.cpu.mk at all! it gets passed to gcc directly and gcc choses -m{tune,arch} on it's own. don't add -march=* directly to CFLAGS. this is bound to go wrong at some point. use CPUTYPE to set the cpu and CFLAGS for -O*, -pipe, etc. also please keep in mind that the optimisations that can be achieved by finetuning make.conf are rather minor. some people think that with cflags and cpu juju they can boost the OS. i don't believe that's true. the chances are much greater that you're adding a problematic switch and end up with binaries during installworld that segfault. so it's not really worth getting into this kinda trouble just for the sake of optimisation. a simple CPUTYPE ?= native COPTFLAGS = -O0 -pipe CFLAGS = -O2 -pipe should be close to perfekt. ;) cheers. alex > > CPUTYPE?=nocona > NO_CPU_CFLAGS=yes > NO_CPU_COPTFLAGS=yes > CFLAGS+= -march=native > > Thank you for your clarifications. -- a13xReceived on Mon Mar 07 2011 - 21:56:52 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:12 UTC