Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Dec 2012 20:48:19 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Scot Hetzel <swhetzel@gmail.com>
Cc:        Mark van Dijk <lists@internecto.net>, freebsd-stable@freebsd.org, Jung-uk Kim <jkim@FreeBSD.org>
Subject:   Re: FreeBSD 9 (amd64) buildworld stage 4.2 fails with clang: unknown target cpu i686
Message-ID:  <50DF4903.9070006@FreeBSD.org>
In-Reply-To: <CACdU%2Bf8O44tXMukY7GvvrApo5pLc0KXG9hTPRGWeTpUSbnEf4Q@mail.gmail.com>
References:  <50DED9BA.1000400@internecto.net> <50DEFF85.3030103@internecto.net> <CACdU%2Bf8O44tXMukY7GvvrApo5pLc0KXG9hTPRGWeTpUSbnEf4Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2012-12-29 20:02, Scot Hetzel wrote:> On Sat, Dec 29, 2012 at 8:34 AM, Mark van Dijk <lists@internecto.net> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50DF4903.9070006>