Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2023 17:05:42 +0100
From:      Peter <pmc@citylink.dinoex.sub.org>
To:        Jamie Landeg-Jones <jamie@catflap.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: 13.2-BETA2: xz: illegal instruction
Message-ID:  <Y/eO1mesdOy1QWW%2B@disp.intra.daemon.contact>
In-Reply-To: <202302231422.31NEM1dn001786@donotpassgo.dyslexicfish.net>
References:  <Y/VaKbBm4ekNobDO@disp.intra.daemon.contact> <202302231422.31NEM1dn001786@donotpassgo.dyslexicfish.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 23, 2023 at 02:22:01PM +0000, Jamie Landeg-Jones wrote:
! Peter <pmc@citylink.dinoex.sub.org> wrote:
!=20
! > > # ./xz < /dev/zero > /dev/null
! > > Illegal instruction (core dumped)
! >                                                                        =
        =20
! > > CPU: Intel(R) Core(TM) i3 CPU         540  @ 3.07GHz (3059.08-MHz K8-=
class CPU)
! > > Origin=3D"GenuineIntel"  Id=3D0x20655  Family=3D0x6  Model=3D0x25  St=
epping=3D5        =20
! >                                                                        =
        =20
! > > CPUTYPE?=3Dwestmere
! >
! > It's liblzma, and it doesn't want westmere, it apparently wants
! > penryn.
!=20
! Doesn't "CPUTYPE?=3Dnative" do the right thing?

Good point, I should test that. (It doesn't concern me, because that
would likely get me code for the machine that is actually doing the
build, and that is not the old i3)

! You can see what features this enables/disables on your machine
! and also the determined "-target-cpu" in the following output:
!=20
! /usr/bin/env -i /usr/bin/clang -v -x c -march=3Dnative -fsyntax-only -o /=
dev/null /dev/null 2>&1

Thanks, You're helpful! :)

 -target-cpu westmere

But when building with CPTYPE?=3Dnative, the code works!


$  /usr/bin/env -i /usr/bin/clang -v -x c -march=3Dnative -fsyntax-only -o =
/dev/null /dev/null 2>&1
FreeBSD clang version 14.0.5 (https://github.com/llvm/llvm-project.git llvm=
org-14.0.5-0-gc12386ae247c)
Target: x86_64-unknown-freebsd13.2
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/bin/clang" -cc1 -triple x86_64-unknown-freebsd13.2 -fsyntax-only -di=
sable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-=
names -main-file-name null -mrelocation-model static -mframe-pointer=3Dall =
-ffp-contract=3Don -fno-rounding-math -mconstructor-aliases -funwind-tables=
=3D2 -target-cpu westmere -target-feature -avx512pf -target-feature -tsxldt=
rk -target-feature +cx16 -target-feature +sahf -target-feature -tbm -target=
-feature -avx512ifma -target-feature -sha -target-feature +crc32 -target-fe=
ature -fma4 -target-feature -vpclmulqdq -target-feature -prfchw -target-fea=
ture -bmi2 -target-feature -cldemote -target-feature -fsgsbase -target-feat=
ure -ptwrite -target-feature -amx-tile -target-feature -uintr -target-featu=
re -gfni -target-feature +popcnt -target-feature -widekl -target-feature -a=
es -target-feature -avx512bitalg -target-feature -movdiri -target-feature -=
xsaves -target-feature -avx512er -target-feature -avxvnni -target-feature -=
avx512fp16 -target-feature -avx512vnni -target-feature -amx-bf16 -target-fe=
ature -avx512vpopcntdq -target-feature -pconfig -target-feature -clwb -targ=
et-feature -avx512f -target-feature -xsavec -target-feature -clzero -target=
-feature -pku -target-feature +mmx -target-feature -lwp -target-feature -rd=
pid -target-feature -xop -target-feature -rdseed -target-feature -waitpkg -=
target-feature -kl -target-feature -movdir64b -target-feature -sse4a -targe=
t-feature -avx512bw -target-feature -clflushopt -target-feature -xsave -tar=
get-feature -avx512vbmi2 -target-feature +64bit -target-feature -avx512vl -=
target-feature -serialize -target-feature -hreset -target-feature -invpcid =
-target-feature -avx512cd -target-feature -avx -target-feature -vaes -targe=
t-feature -avx512bf16 -target-feature +cx8 -target-feature -fma -target-fea=
ture -rtm -target-feature -bmi -target-feature -enqcmd -target-feature -rdr=
nd -target-feature -mwaitx -target-feature +sse4.1 -target-feature +sse4.2 =
-target-feature -avx2 -target-feature +fxsr -target-feature -wbnoinvd -targ=
et-feature +sse -target-feature -lzcnt -target-feature -pclmul -target-feat=
ure -prefetchwt1 -target-feature -f16c -target-feature +ssse3 -target-featu=
re -sgx -target-feature -shstk -target-feature +cmov -target-feature -avx51=
2vbmi -target-feature -amx-int8 -target-feature -movbe -target-feature -avx=
512vp2intersect -target-feature -xsaveopt -target-feature -avx512dq -target=
-feature +sse2 -target-feature -adx -target-feature +sse3 -mllvm -treat-sca=
lable-fixed-error-as-warning -debugger-tuning=3Dgdb -v -fcoverage-compilati=
on-dir=3D/home/operator -resource-dir /usr/lib/clang/14.0.5 -fdebug-compila=
tion-dir=3D/home/operator -ferror-limit 19 -fgnuc-version=3D4.2.1 -faddrsig=
 -D__GCC_HAVE_DWARF2_CFI_ASM=3D1 -x c /dev/null
clang -cc1 version 14.0.5 based upon LLVM 14.0.5 default target x86_64-unkn=
own-freebsd13.2
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/clang/14.0.5/include
 /usr/include
End of search list.

$  /usr/bin/env -i /usr/bin/clang -v -x c -march=3Dwestmere -fsyntax-only -=
o /dev/null /dev/null 2>&1
FreeBSD clang version 14.0.5 (https://github.com/llvm/llvm-project.git llvm=
org-14.0.5-0-gc12386ae247c)
Target: x86_64-unknown-freebsd13.2
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/bin/clang" -cc1 -triple x86_64-unknown-freebsd13.2 -fsyntax-only -di=
sable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-=
names -main-file-name null -mrelocation-model static -mframe-pointer=3Dall =
-ffp-contract=3Don -fno-rounding-math -mconstructor-aliases -funwind-tables=
=3D2 -target-cpu westmere -mllvm -treat-scalable-fixed-error-as-warning -de=
bugger-tuning=3Dgdb -v -fcoverage-compilation-dir=3D/home/operator -resourc=
e-dir /usr/lib/clang/14.0.5 -fdebug-compilation-dir=3D/home/operator -ferro=
r-limit 19 -fgnuc-version=3D4.2.1 -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=3D1=
 -x c /dev/null
clang -cc1 version 14.0.5 based upon LLVM 14.0.5 default target x86_64-unkn=
own-freebsd13.2
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/clang/14.0.5/include
 /usr/include
End of search list.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Y/eO1mesdOy1QWW%2B>