Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jun 2026 13:09:09 +0930
From:      Shane Ambler <FreeBSD@ShaneWare.Biz>
To:        Jan Stary <hans@stare.cz>, freebsd-questions@freebsd.org
Subject:   Re: cpu vs CPUTYPE
Message-ID:  <5d9f80d8-b003-46d5-bc92-3bca45251701@ShaneWare.Biz>
In-Reply-To: <aifoYhxiUoTbQETe@www.stare.cz>
References:  <aiRyHHDFJfVW_BdS@www.stare.cz> <bea195b4-7851-4af6-96f3-989fe7fadf78@gmail.com> <aifoYhxiUoTbQETe@www.stare.cz>

index | next in thread | previous in thread | raw e-mail

On 9/6/26 19:48, Jan Stary wrote:
> On Jun 07 22:15:41, jguojun@gmail.com wrote:
>> The Intel Core i7-4600U (4th Gen) official architectural code name is
>> Haswell, which should be the CPUTYPE.
> 
> Thanks. Reading at the lists of Intel code names
> sorted out CPUTYPE for me on a few amd64 machines.

I think the important point is that CPUTYPE is sent to the compiler, so
it has to be a value accepted by the compiler and be same as or earlier
than the host cpu.

Use `clang --print-supported-cpus` to get a list of supported values,
then the trick is linking that list to user visible model numbers.

You can use llc to get the cpu type of the host machine

% llc --version
...
  Host CPU: sandybridge
...

You need to buildworld with WITH_CLANG_EXTRAS=yes to get llc in base, so
install the llvm pkg and add the version - eg. llc21


--
FreeBSD - the place to B...Software Developing

Shane Ambler


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5d9f80d8-b003-46d5-bc92-3bca45251701>