Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jun 2016 20:37:31 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Da Rock <freebsd-hackers@herveybayaustralia.com.au>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: [solved]: Re: enabling cpu "features" in custom kernel
Message-ID:  <CANCZdfqKEHTw5xxQdss%2B1frYi2Pquvii90gTGHCcHhPE-4vBnQ@mail.gmail.com>
In-Reply-To: <8e9bb248-7c08-436e-6550-c054f449a483@herveybayaustralia.com.au>
References:  <2fa5c2cb-81eb-d44a-3011-db27035e7965@herveybayaustralia.com.au> <092CD08F-3896-451D-8A7E-8DCB056D0118@FreeBSD.org> <8e9bb248-7c08-436e-6550-c054f449a483@herveybayaustralia.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Sadly, the obvious 'makeoptions CPUYPE=broadwell' in the kernel config
doesn't work since it is set too late since bsd.cpu.mk is included
from sys.mk before anything in the Makefile can change things.

Warner

On Sun, Jun 19, 2016 at 6:57 PM, Da Rock
<freebsd-hackers@herveybayaustralia.com.au> wrote:
> On 17/06/2016 20:20, Dimitry Andric wrote:
>>
>> On 16 Jun 2016, at 14:35, Da Rock
>> <freebsd-hackers@herveybayaustralia.com.au> wrote:
>>>
>>> I'm just trying to get my head around kernel building and clang.
>>>
>>> If I want to enable certain features available on my cpu which are
>>> available by clang, how do I enable them? As I understand it using ccflags
>>> is a no no (ie /etc/make.conf), so how do I go about enabling them? I seem
>>> to be missing something in my research here...
>>
>> You can set CPUTYPE in /etc/make.conf, for example:
>>
>> CPUTYPE?=broadwell
>>
>> then it will be automatically picked up in the correct places during
>> buildworld, or during ports building.
>>
>> See also make.conf(5) and /usr/share/examples/etc/make.conf.
>>
>> -Dimitry
>>
> Thank you for that lead. It wasn't quite on it, but referring to
> /usr/share/mk/bsd.cpu.mk provided the answers I sought.
>
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqKEHTw5xxQdss%2B1frYi2Pquvii90gTGHCcHhPE-4vBnQ>