Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Apr 2019 17:04:33 -0500
From:      Bob Willcox <bob@immure.com>
To:        Lorenzo Salvadore <phascolarctos@protonmail.ch>
Cc:        "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>
Subject:   Re: 12.0 installworld core dumping on me
Message-ID:  <20190423220433.GM6607@rancor.immure.com>
In-Reply-To: <VY5IVXkeYqjAiEfioKjBj3VOk6dV13_mlTIWo1NCenI8KJZyEGp70nJzsZqknw8c-BjXI6RlICv3lL71vZ-V-iQ4l03px0useGS69QA5svI=@protonmail.ch>
References:  <20190423125133.GG3392@rancor.immure.com> <20190423183604.GL6607@rancor.immure.com> <VY5IVXkeYqjAiEfioKjBj3VOk6dV13_mlTIWo1NCenI8KJZyEGp70nJzsZqknw8c-BjXI6RlICv3lL71vZ-V-iQ4l03px0useGS69QA5svI=@protonmail.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 23, 2019 at 08:43:34PM +0000, Lorenzo Salvadore via freebsd-stable wrote:
> ????????????????????? Original Message ?????????????????????
> On Tuesday 23 April 2019 20:36, Bob Willcox <bob@immure.com> wrote:
>  ...
> 
> I am playing too with CPUTYPE in these days. I think I will soon write a wiki page
> about that. Here is a short description of what I have found out.
> 
> What I suggest you to do, if you still want to play with CPU_TYPE (I do not recommend it:
> I cannot see any real improvement), is to set CPUTYPE?= native. Then look into
> /usr/share/mk/bsd.cpu.mk what feature you can enable or disable for your processor:
> avx, sse3 etc. Compare this list with the feature supported by your processor (run
> "dmesg | head -n 25" to get them) and define MACHINE_CPU+= with what you need
> (some features probably are already set: check them with "make -V MACHINE_CPU").
> 
> Reading /usr/share/mk/bsd.cpu.mk you will see some values you can give to CPUTYPE
> that will set automatically MACHINE_CPU to the right value. However I discourage you
> from using them: in my case, I should set CPU_TYPE?=ivybridge, however bsd.cpu.mk,
> clang and gcc all believe that ivybridge support avx, but this is wrong at least for my
> cpu, thus I get invalid instructions (even if I correct bsd.cpu.mk), while everything is
> fine by setting CPU_TYPE?=native.
> If, however, you still want to set your specific model instead of native into CPU_TYPE,
> you can get the supposed right value running
> "cc -v -x c -E -march=native /dev/null -o /dev/null" or "llvm-tblgen -version".
> 
> If you happen to encounter some invalid instructions with some port, recompile it
> with NO_CPU_CFLAGS=yes: this will avoid setting -march=<CPU_TYPE> in
> your CFLAGS.
> I had to do that with ports involving rust.
> 
> Lorenzo Salvadore.

Thanks for the info/insight Lorenzo. I think I will simply skip setting it from
now on though. I burned/wasted way more time on this than I care to think about
already. It sounds like (based on what you have said) there really isn't a big
reward for using it anyway.

Thanks again,
Bob


-- 
Bob Willcox    | "Too often we enjoy the comfort of opinion
bob@immure.com | without the discomfort of thought."
Austin, TX     |     - John F. Kennedy



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