Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jun 2016 21:00:11 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>, 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:  <1466391611.34556.35.camel@freebsd.org>
In-Reply-To: <CANCZdfqKEHTw5xxQdss%2B1frYi2Pquvii90gTGHCcHhPE-4vBnQ@mail.gmail.com>
References:  <2fa5c2cb-81eb-d44a-3011-db27035e7965@herveybayaustralia.com.au> <092CD08F-3896-451D-8A7E-8DCB056D0118@FreeBSD.org> <8e9bb248-7c08-436e-6550-c054f449a483@herveybayaustralia.com.au> <CANCZdfqKEHTw5xxQdss%2B1frYi2Pquvii90gTGHCcHhPE-4vBnQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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
> <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"
> _______________________________________________
> 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?1466391611.34556.35.camel>