From owner-freebsd-hackers@freebsd.org Mon Jun 20 03:00:14 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 16FAEA7B914 for ; Mon, 20 Jun 2016 03:00:14 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 DCFFF1E63 for ; Mon, 20 Jun 2016 03:00:13 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 29668358-3693-11e6-a0ff-e511cd071b9b X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.34.117.227 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Mon, 20 Jun 2016 03:00:36 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.14.9) with ESMTP id u5K30BQx002296; Sun, 19 Jun 2016 21:00:11 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1466391611.34556.35.camel@freebsd.org> Subject: Re: [solved]: Re: enabling cpu "features" in custom kernel From: Ian Lepore To: Warner Losh , Da Rock Cc: "freebsd-hackers@freebsd.org" Date: Sun, 19 Jun 2016 21:00:11 -0600 In-Reply-To: References: <2fa5c2cb-81eb-d44a-3011-db27035e7965@herveybayaustralia.com.au> <092CD08F-3896-451D-8A7E-8DCB056D0118@FreeBSD.org> <8e9bb248-7c08-436e-6550-c054f449a483@herveybayaustralia.com.au> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 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 03:00:14 -0000 On Sun, 2016-06-19 at 20:37 -0600, Warner Losh wrote: > 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 > But makeoptions CONF_CFLAGS="-march=broadwell" should work. (We use that construct in arm config files). -- Ian > On Sun, Jun 19, 2016 at 6:57 PM, Da Rock > wrote: > > 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. > > > > _______________________________________________ > > 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" > _______________________________________________ > 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"