MACHINE_CPU not being set correctly when CPUTYPE=native.

Scot Hetzel swhetzel at gmail.com
Tue Mar 23 03:05:49 UTC 2010


Could someone commit the last patch in PR 112997 to
share/mk/bsd.cpu.mk, as it fixes the bug where MACHINE_CPU is not set
correctly when CPUTYPE is set to 'native'.

On Tue, Aug 28, 2007 at 1:54 AM, Scot Hetzel <swhetzel at gmail.com> wrote:
> Gcc 4.2 has a new cpu_type (native) for x86 and amd64 systems.  This
> cpu_type is to allow gcc to automatically detect the processor type
> that gcc is running on.
>
> The problem is that setting CPUTYPE?=native in either src.conf or
> make.conf will cause MACHINE_CPU to be set to the wrong value for the
> native cpu.
>
> For example on a system where the processor is a k8, setting CPUTYPE
> to k8, shows that MACHINE_CPU is set as follows:
>
> hp010# make -V MACHINE_CPU -DCPUTYPE=k8
> k8 3dnow amd64 sse2 sse mmx
>
> But setting CPUTYPE to native on a k8 system sets MACHINE_CPU to this value:
>
> hp010# make -V MACHINE_CPU -DCPUTYPE=native
> unknown amd64 sse2 sse mmx
>
> After patching share/mk/bsd.cpu.mk (see attachment) or the last patch
> to PR 112997:
>
>  http://www.freebsd.org/cgi/query-pr.cgi?pr=112997
>
> setting CPUTYPE to native now works correctly when setting the value
> for MACHINE_CPU:
>
> hp010# make -V MACHINE_CPU -V CPUTYPE -DCPUTYPE=native
> k8 3dnow amd64 sse2 sse mmx
> k8
>
> Could this get committed before -CURRENT is branched.
>
> Thanks,
>
> Scot


More information about the freebsd-current mailing list