CPUTYPE in mk.conf to set -march like in FreeBSD?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CPUTYPE in mk.conf to set -march like in FreeBSD?

IL Ka
In FreeBSD they have /etc/make.conf
You set CPUTYPE=<YOUR_CPU> there, and
/usr/share/mk/bsd.cpu.mk will read it, and set -march for CPUCFLAGS

This variable is used by ports, kernel, and any random Makefile may use it.
(There are similar things in Linux Gentoo also)

But OpenBSD /etc/mk.conf does not have it nor bsd.cpu.mk
exists in /usr/share/mk

So, OpenBSD does not use this approach, right?
But why? Is it because most ports ignore it?
Reply | Threaded
Open this post in threaded view
|

Re: CPUTYPE in mk.conf to set -march like in FreeBSD?

Theo de Raadt-2
IL Ka <[hidden email]> wrote:

> In FreeBSD they have /etc/make.conf
> You set CPUTYPE=<YOUR_CPU> there, and
> /usr/share/mk/bsd.cpu.mk will read it, and set -march for CPUCFLAGS
>
> This variable is used by ports, kernel, and any random Makefile may use it.
> (There are similar things in Linux Gentoo also)
>
> But OpenBSD /etc/mk.conf does not have it nor bsd.cpu.mk
> exists in /usr/share/mk
>
> So, OpenBSD does not use this approach, right?
> But why? Is it because most ports ignore it?

Because that's a fantastic way to accidentally build incompatible
snapshots and releases.