From owner-freebsd-current@FreeBSD.ORG Mon Mar 7 22:56:52 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id A60411065674; Mon, 7 Mar 2011 22:56:52 +0000 (UTC) Date: Mon, 7 Mar 2011 22:56:52 +0000 From: Alexander Best To: George Liaskos Message-ID: <20110307225652.GA61509@freebsd.org> References: <20110307205957.GA47557@freebsd.org> <20110307214935.GA53914@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-current@freebsd.org Subject: Re: r219385 build error. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2011 22:56:52 -0000 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. -- a13x