Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Mar 2010 22:05:48 -0500
From:      Scot Hetzel <swhetzel@gmail.com>
To:        freebsd-current <freebsd-current@freebsd.org>
Subject:   MACHINE_CPU not being set correctly when CPUTYPE=native.
Message-ID:  <790a9fff1003222005i10dada54u921ba58ed2ea1f7b@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff1003222005i10dada54u921ba58ed2ea1f7b>