[solved]: Re: enabling cpu "features" in custom kernel

Ian Lepore ian at freebsd.org
Mon Jun 20 03:00:14 UTC 2016


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 at herveybayaustralia.com.au> wrote:
> > On 17/06/2016 20:20, Dimitry Andric wrote:
> > > 
> > > On 16 Jun 2016, at 14:35, Da Rock
> > > <freebsd-hackers at 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 at freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> > To unsubscribe, send any mail to "
> > freebsd-hackers-unsubscribe at freebsd.org"
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "
> freebsd-hackers-unsubscribe at freebsd.org"


More information about the freebsd-hackers mailing list