From owner-freebsd-stable@FreeBSD.ORG Sat Dec 29 19:48:20 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D98B5E2F; Sat, 29 Dec 2012 19:48:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 8BE548FC12; Sat, 29 Dec 2012 19:48:20 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:2117:5ae5:2037:1400] (unknown [IPv6:2001:7b8:3a7:0:2117:5ae5:2037:1400]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id E4E2C5C5A; Sat, 29 Dec 2012 20:48:12 +0100 (CET) Message-ID: <50DF4903.9070006@FreeBSD.org> Date: Sat, 29 Dec 2012 20:48:19 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20121128 Thunderbird/18.0 MIME-Version: 1.0 To: Scot Hetzel Subject: Re: FreeBSD 9 (amd64) buildworld stage 4.2 fails with clang: unknown target cpu i686 References: <50DED9BA.1000400@internecto.net> <50DEFF85.3030103@internecto.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Mark van Dijk , freebsd-stable@freebsd.org, Jung-uk Kim X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 19:48:20 -0000 On 2012-12-29 20:02, Scot Hetzel wrote:> On Sat, Dec 29, 2012 at 8:34 AM, Mark van Dijk wrote: >> On 29-12-12 12:53, Mark van Dijk wrote: >>> I suspect that the error is caused by -march=native, my CPU is an Intel >>> Core i5. >> >> Looks like I was correct. CPUTYPE?=core2 will build world fine so >> perhaps 'native' does not know about my processor yet. Apparently it >> falls back to assuming it's a i686. >> > > Tha problem that src/share/mk/bsd.cpu.mk doesn't know how to handle > CPUTYPE=native correctly. Actually, CPUTYPE=native is simply not supported. Just specify one of the supported types that matches your CPU most closely. ... > See http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/112997 for one possible fix. The fix there invokes the compiler and some other tools for each include of the .mk file, which is usually too much overhead. Also, from the compiler output it is not very easy to get the list of supported features. I would rather fix bsd.cpu.mk to explicitly reject any non-recognized CPUTYPE value.