From owner-freebsd-hackers@freebsd.org Mon Jun 20 00:58:05 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74259A7937D for ; Mon, 20 Jun 2016 00:58:05 +0000 (UTC) (envelope-from freebsd-hackers@herveybayaustralia.com.au) Received: from mail.unitedinsong.com.au (mail.unitedinsong.com.au [150.101.178.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DF631197 for ; Mon, 20 Jun 2016 00:58:04 +0000 (UTC) (envelope-from freebsd-hackers@herveybayaustralia.com.au) Received: from [192.168.0.134] (laptop1.herveybayaustralia.com.au [192.168.0.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.unitedinsong.com.au (Postfix) with ESMTPSA id 046626205A for ; Mon, 20 Jun 2016 10:57:53 +1000 (EST) Subject: [solved]: Re: enabling cpu "features" in custom kernel To: freebsd-hackers@freebsd.org References: <2fa5c2cb-81eb-d44a-3011-db27035e7965@herveybayaustralia.com.au> <092CD08F-3896-451D-8A7E-8DCB056D0118@FreeBSD.org> From: Da Rock Message-ID: <8e9bb248-7c08-436e-6550-c054f449a483@herveybayaustralia.com.au> Date: Mon, 20 Jun 2016 10:57:53 +1000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <092CD08F-3896-451D-8A7E-8DCB056D0118@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2016 00:58:05 -0000 On 17/06/2016 20:20, Dimitry Andric wrote: > On 16 Jun 2016, at 14:35, Da Rock 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.